NAME
apt-cache - query the APT cache
SYNOPSIS
apt-cache [-agipns] [-o=config_string] [-c=config_file] {gencaches | showpkg pkg... | showsrc pkg... | stats | dump | dumpavail | unmet | search regex... | show pkg [{=pkg_version_number | /target_release}]... | depends pkg [{=pkg_version_number | /target_release}]... | rdepends pkg [{=pkg_version_number | /target_release}]... | pkgnames [prefix] | dotty pkg [{=pkg_version_number | /target_release}]... | xvcg pkg [{=pkg_version_number | /target_release}]... | policy [pkg...] | madison pkg... | {-v | --version} | {-h | --help}}
DESCRIPTION
apt-cache performs a variety of operations on APT's package cache. apt-cache does not manipulate the state of the system but does provide operations to search and generate interesting output from the package metadata. The metadata is acquired and updated via the 'update' command of e.g. apt-get, so that it can be outdated if the last update is too long ago, but in exchange apt-cache works independently of the availability of the configured sources (e.g. offline).
Unless the -h, or --help option is given, one of the commands below must be present.
gencaches
showpkgpkg...
Package: libreadline2
Versions: 2.1-12(/var/state/apt/lists/foo_Packages),
Reverse Depends:
\n
libreadlineg2,libreadline2
\n
libreadline2-altdev,libreadline2
Dependencies:
2.1-12 - libc5 (2 5.4.0-0) ncurses3.0 (0 (null))
Provides:
2.1-12 -
Reverse Provides:stats
showsrcpkg...
dump
dumpavail
unmet
showpkg...
searchregex...
Separate arguments can be used to specify multiple search patterns that are and'ed together.
dependspkg...
rdependspkg...
pkgnames [prefix]
Note that a package which APT knows of is not necessarily available to download, installable or installed, e.g. virtual packages are also listed in the generated list.
dottypkg...
The resulting nodes will have several shapes; normal packages are boxes, pure virtual packages are triangles, mixed virtual packages are diamonds, missing packages are hexagons. Orange boxes mean recursion was stopped (leaf packages), blue lines are pre-depends, green lines are conflicts.
Caution, dotty cannot graph larger sets of packages.
xvcgpkg...
policy [pkg...]
madisonpkg...
OPTIONS
All command line options may be set using the configuration file, the descriptions indicate the configuration option to set. For boolean options you can override the config file by using something like -f-,--no-f, -f=no or several other variations.
-p, --pkg-cache
-s, --src-cache
-q, --quiet
-i, --important
--no-pre-depends, --no-depends, --no-recommends, --no-suggests, --no-conflicts, --no-breaks, --no-replaces, --no-enhances
--implicit
-f, --full
-a, --all-versions
-g, --generate
--names-only, -n
--all-names
--recurse
--installed
--with-sourcefilename
Sources and Packages can be compressed in any format apt supports as long as they have the correct extension. If you need to store multiple of these files in one directory you can prefix a name of your choice with the last character being an underscore ("_"). Example: my.example_Packages.xz
Note that these sources are treated as trusted (see apt-secure(8)). Configuration Item: APT::Sources::With.
-h, --help
-v, --version
--audit
-c, --config-file
-o, --option
--no-color, --color
FILES
/etc/apt/sources.list
/etc/apt/sources.list.d/
/var/lib/apt/lists/
/var/lib/apt/lists/partial/
SEE ALSO
apt.conf(5), sources.list(5), apt-get(8), apt-patterns(7)
DIAGNOSTICS
apt-cache returns zero on normal operation, decimal 100 on error.
BUGS
APT bug page[3]. If you wish to report a bug in APT, please see /usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command.
AUTHORS
Jason Gunthorpe
APT team
NOTES
- 1.
GraphViz
- 2.
VCG tool
- 3.
APT bug page