1 mailto(apt@packages.debian.org)
2 manpage(apt-cache)(8)(4 Dec 1998)(apt)()
3 manpagename(apt-cache)(APT package handling utility -- cache manipulator)
6 apt-cache command [argument ...]
9 bf(apt-cache) performs a variety of operations on APT's package cache.
10 bf(apt-cache) is seldom called directly; instead its operations are
11 performed automatically by the other bf(apt) utilities.
13 em(command) is one of:
15 it() add file1 [file2] [...]
17 it() showpkg package1 [package2] [...]
30 Unless the -h, or --help option is given one of the above commands
35 bf(add) adds the names package index files to the package cache.
38 bf(gencaches) performs the same opration as bf(apt-get check). It builds
39 the source and package caches from thes sources in bf(/etc/apt/sources.list)
40 and from bf(/var/lib/dpkg/status).
43 bf(showpkg) displays information about the packages listed on the
44 command line. Remaining arguments are package names. The available versions
45 and reverse dependencies of each package listed are listed, as well as
46 forward dependencies for each version. Forward (normal) dependencies
47 are those packages upon which the package in question depends; reverse
48 dependencies are those packages that depend upon the package in
49 question. Thus, forward dependencies must be satisfied for a package,
50 but reverse dependencies need not be.
51 For instance, bf(apt-cache showpkg libreadline2) would produce output similar
59 2.1-12(/var/state/apt/lists/debian.midco.net_debian_dists_slink_main_binary-i386_Packages),
63 libreadlineg2,libreadline2
65 libreadline2-altdev,libreadline2
68 2.1-12 - libc5 (2 5.4.0-0) ncurses3.0 (0 (null)) ldso (2 1.9.0-1)
77 Thus it may be seen that libreadline2, version 2.1-8, depends on libc5,
78 ncurses3.0, and ldso, which must be installed for libreadline2 to work. In
79 turn, libreadlineg2 and libreadline2-altdev depend on libreadline2. If
80 libreadline2 is installed, libc5, ncurses3.0, and ldso must also be
81 installed; libreadlineg2 and libreadline2-altdev do not have to be
82 installed. For the specific meaning of the remainder of the output it
83 is best to consult the apt source code.
86 bf(stats) displays some statistics about bf(cache).
87 No further arguments are expected. Statistics reported are:
89 it() bf(Total package names) is the number of package names found in the cache.
91 it() bf(Normal packages) is the number of regular, ordinary package names; these
92 are packages that bear a one-to-one correspondence between their names and
93 the names used by other packages for them in dependencies. The majority of
94 packages fall into this category.
96 it() bf(Pure virtual packages) is the number of packages that exist only as
97 a virtual package name; that is, packages only "provide" the virtual
98 package name, and no package actually uses the name. For instance,
99 "mail-transport-agent" in the Debian GNU/Linux system is a pure virtual
100 package; several packages provide "mail-transport-agent", but there is no
101 package named "mail-transport-agent".
103 it() bf(Single virtual packages) is the number of packages with only one
104 package providing a particular virtual package. For instance, in the
105 Debian GNU/Linux system, "X11-text-viewer" is a virtual package, but only
106 one package, xless, provides "X11-text-viewer".
108 it() bf(Mixed virtual packages) is the number of packages that either provide
109 a particular virtual package or have the virtual package name as the
110 package name. For instance, in the Debian GNU/Linux system, e2fsprogs is
111 both an actual package, and provided by the e2compr package.
113 it() bf(Missing) is the number of package names that were referenced in a
114 dependency but were not provided by any package. Missing packages may be
115 in evidence if a full distribution is not accesssed, or if a package
116 (real or virtual) has been dropped from the distribution.
118 it() bf(Total distinct) versions is the number of package versions found in
119 the cache; this value is therefore at least equal to the number of total
120 package names. If more than one distribution (both "stable" and "unstable",
121 for instance), is being accessed, this value can be considerably larger
122 than the number of total package names.
124 it() bf(Total dependencies) is the number of dependency relationships claimed
125 by all of the packages in the cache.
129 bf(dump) shows a short listing of every package in the cache. It is primarily
133 bf(dumpavail) prints out an available list to stdout. This is suitable for use
134 with df(dpkg) and is used by the bf(dselect) method.
137 bf(unmet) displays a summary of all unmet dependencies in the package cache.
140 bf(check) is a random function for testing certain aspects of the cache.
144 bf(showpkg) displays a listing of the given package cache structure and some
145 related information about it. The list is ment primarily for debugging.
148 bf(show) performs the same function as dpkg --print-avail, it displays
149 the package records for the named packages.
152 bf(search) performs a full text search on all available package files for
153 the pattern given. It searchs the package names and the descriptions for
154 an occurance of the string and prints out the package name and the short
155 description. If --full is given then output identical to bf(show) is produced
156 for each matched package and if --names-only is given then the long
157 description is not searched, only the package name is.
160 bf(depends) shows a listing of each dependency a package has and all
161 the possible other packages that can fullfill that dependency.
164 This command prints the name of each package in the system. The optional
165 argument is a prefix match to filter the name list. The output is suitable
166 for use in a shell tab complete function and the output is generated extremly
167 quickly. This command is best used with the bf(--no-generate) option.
172 All command line options may be set using the configuration file, the
173 descriptions indicate the configuration option to set. For boolean
174 options you can override the config file by using something like bf(-f-),
175 bf(--no-f), bf(-f=no) or several other variations.
179 Show a short usage summary.
181 dit(bf(-v, --version))
182 Show the program verison.
184 dit(bf(-p --pkg-cache))
185 Select the file to store the package cache. The package cache is the primary
186 cache used by all operations.
187 Configuration Item: bf(Dir::Cache::pkgcache).
189 dit(bf(-s --src-cache))
190 Select the file to store the source cache. The source is used only by
191 bf(gencaches) and it stores a parsed version of the package information from
192 remote sources. When building the package cache the source cache is used
193 to advoid reparsing all of the package files.
194 Configuration Item: bf(Dir::Cache::srcpkgcache).
197 Quiet; produces output suitable for logging, omitting progress indicators.
198 More qs will produce more quite up to a maximum of 2. You can also use
199 bf(-q=#) to set the quiet level, overriding the configuration file.
200 Configuration Item: bf(quiet).
202 dit(bf(-i --important))
203 Print only important deps; for use with unmet causes only em(Depends) and
204 em(Pre-Depends) relations to be printed.
205 Configuration Item: bf(APT::Cache::Important).
208 Print full package records when searching. Configuration Item: bf(APT::Cache::ShowFull).
210 dit(bf(-a --all-versions))
211 Print full records for all available versions, this is only applicable to the
212 show command. Configuration Item: bf(APT::Cache::AllVersions)
214 dit(bf(-g --no-generate))
215 Do not perform automatic package cache regeneration, use the cache as it is.
216 Configuration Item: bf(APT::Cache::NoGenerate).
218 dit(bf(--names-only))
219 Only search on the package names, not the long description.
220 Configuration Item: bf(APT::Cache::NamesOnly).
223 Make bf(pkgnames) print all names, including virtual packages and missing
224 dependencies. Configuration Item: bf(APT::Cache::AllNames).
226 dit(bf(-c, --config-file))
227 Configuration File; Specify a configuration file to use. bf(apt-get) will
228 read the default configuration file and then this configuration file. See
229 bf(apt.conf(5)) for syntax information.
231 dit(bf(-o, --option))
232 Set a Configuration Option; This will set an arbitary configuration option.
234 verb(-o Foo::Bar=bar)
239 it() /etc/apt/sources.list
240 locations to fetch packages from
242 it() /var/state/apt/lists/
243 storage area for state information for each package resource specified in
245 it() /var/state/apt/lists/partial/
246 storage area for state information in transit
255 apt-cache returns zero on normal operation, decimal 100 on error.
258 See http://bugs.debian.org/apt. If you wish to report a
259 bug in bf(apt-cache), please see bf(/usr/doc/debian/bug-reporting.txt)
260 or the bf(bug(1)) command.
263 apt-get was written by the APT team <apt@packages.debian.org>.