Pro+ Categories in the search string.
For example, let’s search for all plugins in the Dolphin Emulator and Dolphin-Tools repositories with the category tag “libretro” – this would search for libretro packages – it will look something like this:
Code:
$ apt list libretro* --all-sections
–filter output: Allows for fine-grained control over packages, you could pass in a regular expression to filter out packages that have “libretro” anywhere in the description
–show-origin allows you to see the exact origin of each package
–show-rdepends: Shows a list of package dependency info for every package
Example output:
This shows the origin, the package name, description, and more for every installed package. More about using the -S flag below.
There are more useful filters you can use as well, check out the man pages to see the full list of options available.
List versions of a package:
If you want to find out what version of a package is installed, you can use the following command:
$ apt-cache show
| grep Version
Example output:
Code:
$ apt-cache show gcc-6 | grep Version
This command searches apt’s cache and shows the latest available version of the “gcc-6” package
Example output:
Code:
$ apt-cache show vlc | grep Version
This command searches apt’s cache and shows the latest available version of the “vlc” package
See details about a package:
This command will dump a ton of information about a package. The “package” variable here represents any installed package.
This is a good command to run if you’re trying to find the official/standard package for a certain tool, or if you need to find out what version of a package to install in order to match with another distribution.
See what packages are available in which repo:
This command can be very useful to see exactly what versions of a package are available for a given repository.
There are certain repositories that you might want to check out and see what versions of packages they have available. This command will take in the repo name and give a full list of packages available for that repo, even broken/non-installed ones.
It uses aptitude (which you must have installed for this to work) so if you get an error about aptitude you’ll need to install aptitude first:
$ apt install aptitude
Example output:
Code:
$ apt list repos | grep unstable
This command will list all the repositories, showing their origin as well as available packages (if any).
Example output:
Code:
$ apt list repos | grep unstable
You can grep through the output to locate a specific repository of your choice.
Example output:
Code:
$ apt list repos | grep -i '(backports|testing)'
You can grep through the output to locate a specific repository of your choice.
Example output:
Code:
$ apt list repos | grep -i '(backports|testing)'
You can grep through the output to locate a specific repository of your choice.
Find dependencies of a package
To find a package’s dependencies, you can use apt-cache, but first you have to use apt-get to install the apt-cache tool:
$ apt-get install apt-cache
Once you have apt-cache installed, you can run this command to see what dependencies a package has:
$ apt-cache depends
Example output:
Code:
$ apt-cache depends vlc
Example output:
Code:
Depends: libc6 (>= 2.2.5), libfreetype6 (>= 2.2.1), libjpeg62 (>= 6b1), libncurses5 (>= 5.6+20070828), libstdc++6 (>= 6), zlib1g (>= 1:1.2.3.3)
Example output:
Code:
$ apt-cache depends vlc | grep gtk
Example output:
Code:
Depends: gtk2 (>= 2.10), gtk3 (>= 3.16), vlc-nox (= 2.1.5-0ubuntu18), libc6 (>= 2.2.5), libfreetype6 (>= 2.2.1), libjpeg62 (>= 6b1), libncurses5 (>= 5.6+20070828), libstdc++6 (>= 6), zlib1g (>= 1:1.2.3.3), gstreamer1.0-plugins-base (>= 1.6), gstreamer1.0-plugins-base-apps (>= 1.8), gstreamer1.0-libav (>= 1.7.0), vlc (>= 2.1.5)
Example output:
Code:
$ apt-cache depends vlc | grep gstreamer | grep gtk
Example output:
Code:
Depends: gtk2 (>= 2.10), gtk3 (>= 3.16), vlc-nox (= 2.1.5-0ubuntu18), libc6 (>= 2.2.5), libfreetype6 (>= 2.2.1), libjpeg62 (>= 6b1), libncurses5 (>= 5.6+20070828), libstdc++6 (>= 6), zlib1g (>= 1:1.2.3.3), gstreamer1.0-libav (>= 1.7.0), vlc (>= 2.1.5)
This is a pretty useful command to know, you can use it to see what packages you need to install before installing a package.
Show a package’s “Provides” and “Conflicts” information:
This command lets you see what packages are provided/required by a package, so you can know which other packages you need to install or remove before installing this package.
You can also find out what other packages will conflict with your package.
Example output:
Code:
$ apt-cache show vlc
Example output:
Code:
Package: vlc
Priority: optional
Section: universe/sound
Installed-Size: 2,9M
Maintainer: David Bala
Original-Maintainer: Debian Multimedia Maintainers
Architecture: all
Source: vlc
Version: 2.2.4+snapshotsr39597+really2.2.4+r30876-0ubuntu1~ubuntu14.04.1
Replaces: libva-vaapi-driver (<< 1.1.4-1ubuntu1)
Breaks: libva-x11-1 (<< 1.1.4-1ubuntu1)
Provides: libc6
Conflicts: libva-x11-1 (<< 1.1.4-1ubuntu1), libva-x11-1:i386 (<< 1.1.4-1ubuntu1), libva-x11-1:i386 (<< 1.1.4-1ubuntu1)
Description: VideoLAN client - the ultimate media player
VLC is a highly portable multimedia player and framework that