Sec. 10 Apt Flashcards
How would I check to see if there were any updates using apt?
$ sudo apt -update
If I wanted to upgrade the system i.e. install new versions of the packages that I already have installed how would I use apt?
sudo apt -upgrade
apt-cache
- query the APT cache
-
apt-cache
- perfoms a cariety of operation on APT’s package cache
- does not manipulate the state of the system but does provide operations to search and generate interesting output from the package metadata
apt-cache
–showpkg pkg…..
- displays info about the packages listed on the command line
- remaining arguments are package names
apt-cache
stats
- stats displays statistics about the cache.
- no further arg. are expected.
List all installed kernel-related packages, and list all installed or available ones.
$ apt-cache search “kernel”
$ apt-cache search -n “kernel”
$ apt-cache pkgnames “kernel”
. All packages that contain a reference to bash in their name or description.
$ apt-cache search bash
. Installed and available bash packages.
. $ apt-cache search -n bash
The package information for bash.
$ apt-cache show bash
The dependencies for the bash package.
$ apt-cache depends bash
$ apt-cache rdepends bash
To get a list of of available metapackages:
$ apt-cache search metapackage
apt-cache stats
displays some statistics about the cache.
no further arg are needed
apt-cache showpkg pkg
displays info about the packages listed on the command line.
remaining arg are package names
apt-cache showsrc pkg….
displays all the source package records that match the given package names .
all versions are shown, as well as all records that declare the name to be a binary package.
use –only-source to display only source packages names
apt-cache dump
shows a short list of every package in the cache
used primarily for debugging