apt-cache command
The APT suite of tools includes a command called apt-cache whose purpose is to provide information about the Debian package database. Information are gathered during the apt-get update operation from the sources listed in the sources.list file.
In this lesson we will describe some features of this command.
Search for a program
Let’s say you would like to install a network mapper, but you don’t know the exact name of the program. You could type apt-cache search network mapper to get a list of packages that contain the words network mapper in their name or description:
Display Package Information
To display information about a particural package, use the apt-cache showpkg PACKAGE_NAME command:
Display Package Statistics
To learn how many packages are installed, how many dependencies are recorded, and various other statistics about the package database, use the apt-cache stats command:
Find Unmet Dependencies
To display information about unmet dependencies, use the apt-cache unmet command. This command displays a summary of all unmet dependencies in the package cache.
Display Dependencies
To show all of the specified package’s dependencies, use the apt-cache depends PACKAGE_NAME command:
Locate All Packages
To display the names of all the packages installed on the system, use the apt-cache pkgnames command. You can specify the second parameter to filter the name list. For example, to find all packages that begin with the string doc, we would use the following command: