apt-cache(8)

NAME
apt-cache - APT package handling utility — cache manipulator

SYNOPSIS
apt-cache command cache [argument ...]

DESCRIPTION
apt-cache performs a variety of operations on APT's package cache. apt-cache is seldom called directly; instead it is usually invoked internally by apt-get(8) or apt(8).

command is one of
    add
    dump
    dumpavail
    showpkg
    stats

cache must be a package cache file (for instance, /var/cache/apt/pkgcache.bin). Some commands require additional arguments.

  add
add adds a new set of package records to cache. Remaining arguments are of the form file:dist:ver, where file is the full path to file in question. dist and ver can be any string and are not yet implemented.

  dump
dump displays information about all the packages in the cache. See showpkg below for an explanation of what data is output for each package.

  dumpavail
dumpavail generates an available file suitable for use with dpkg(8) based on the information in the cache.

  showpkg
showpkg displays information about the packages listed on the command line. Remaining arguments are package names. The available versions and reverse dependencies of each package listed are listed, as well as forward dependencies for each version. Forward (normal) dependencies are those packages upon which the package in question depends; reverse dependencies are those packages that depend upon the package in question. Thus, forward dependencies must be satisfied for a package, but reverse dependencies need not be. For instance, apt-cache showpkg cache libreadline2 would produce output similar to the following:

    Package: libreadline2
    Versions: 2.1-8,2.1-7,
    Reverse Depends:
        libreadlineg2,libreadline2
        libreadlineg2,libreadline2
        libreadline2-altdev,libreadline2
    Dependencies:
    2.1-8 - libc5 ncurses3.0 ldso
    2.1-7 - ldso libc5 ncurses3.0

Thus it may be seen that libreadline2, version 2.1-8, depends on libc5, ncurses3.0, and ldso, which must be installed for libreadline2 to work. In turn, libreadlineg2 and libreadline2-altdev depend on libreadline2. If libreadline2 is installed, libc5, ncurses3.0, and ldso must also be installed; libreadlineg2 and libreadline2-altdev do not have to be installed.

  stats
stats displays some statistics about cache. No further arguments are expected. Statistics reported are:

    Total package names
        is the number of package names found in the cache.

    Normal packages
        is the number of regular, ordinary package names; these are packages that bear a one-to-one correspondence between their names and the names used by other packages for them in dependencies. The majority of packages fall into this category.

    Pure virtual packages
        is the number of packages that exist only as a virtual package name; that is, packages only "provide" the virtual package name, and no package actually uses the name. For instance, "mail-transport-agent" in the Debian GNU/Linux system is a pure virtual package; several packages provide "mail-transport-agent", but there is no package named "mail-transport-agent".

    Single virtual packages
        is the number of packages with only one package providing a particular virtual package. For instance, in the Debian GNU/Linux system, "X11-text-viewer" is a virtual package, but only one package, xless, provides "X11-text-viewer".

    Mixed virtual packages
        is the number of packages that either provide a particular virtual package or have the virtual package name as the package name. For instance, in the Debian GNU/Linux system, e2fsprogs is both an actual package, and provided by the e2compr package.

    Missing
        is the number of package names that were referenced in a dependency but were not provided by any package. Missing packages may be in evidence if a full distribution is not accesssed, or if a package (real or virtual) has been dropped from the distribution.

    Total distinct versions
        is the number of package versions found in the cache; this value is therefore at least equal to the number of total package names. If more than one distribution (both "stable" and "unstable", for instance), is being accessed, this value can be considerably larger than the number of total package names.

    Total dependencies
        is the number of dependency relationships claimed by all of the packages in the cache.

OPTIONS
None.

FILES
None.

SEE ALSO
apt(8), apt-get(8), /usr/doc/apt/cache*

DIAGNOSTICS
apt-cache returns zero on normal operation, decimal 100 on error.

BUGS
See <http://www.debian.org/Bugs/db/pa/lapt.html>. If you wish to report a bug in apt-cache, please see /usr/doc/debian/bug-reporting.txt or the bug(1) command.

AUTHOR
apt-cache was written by the APT team <apt@packages.debian.org>.