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
apt-cache dumpavail
prints out an available list to stdout .
apt-cache unmet
show a summary of all unmet dependencies in the package cache
apt-cache show pkg….
performs a function simlar to dpkg –print-avail ; it displays the package records for the named packages .
apt-search regex……
performs a full text search on all available package lists for the POSIX regex pattern given,
it searches package names and the descriptions, including virtual package names .
if –full is given then the output identical to shwo is produced for each matched package.
apt-cache depends pkg….
shows a listing of each dependency a package has and all the possible other packages that can fulfill that dependency.
apt-cache rdepends pkg….
shows a listing of each reverse dependency a package has.
apt-cache pkgnames [prefix]
this command prints the name of each package apt knows.
apt
command line interface
apt provides a high-level comandline interface for the package management system