1
.\" This manpage has been automatically generated by docbook2man-spec
2
.\" from a DocBook document. docbook2man-spec can be found at:
3
.\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
4
.\" Please send any bug reports, improvements, comments, patches,
5
.\" etc. to Steve Cheng <steve@ggi-project.org>.
6
.TH "APT-CACHE" "8" "12 March 2001" "" ""
1
.\"Generated by db2man.xsl. Don't modify this, modify the source.
10
.de Sp \" Vertical space (when we can't use .PP)
16
.ie \\n(.$>=3 .ne \\$3
20
.TH "APT-CACHE" 8 "29 February 2004" "Linux" ""
8
22
apt-cache \- APT package handling utility -- cache manipulator
11
\fBapt-cache\fR [ \fB-hvs\fR ] [ \fB-o=\fIconfig string\fB\fR ] [ \fB-c=\fIfile\fB\fR ] \fB [ add \fIfile\fB\fI...\fB ] [ gencaches ] [ showpkg \fIpkg\fB\fI...\fB ] [ stats ] [ dump ] [ dumpavail ] [ unmet ] [ search \fIregex\fB ] [ show \fIpkg\fB\fI...\fB ] [ showpkg \fIpkg\fB\fI...\fB ] [ depends \fIpkg\fB\fI...\fB ] [ pkgnames \fIprefix\fB ] [ dotty \fIpkg\fB\fI...\fB ] [ policy \fIpkgs\fB\fI...\fB ] \fR
27
\fBapt\-cache\fR [\fB\-hvsn\fR] [\fB\-o=\fIconfig\ string\fR\fR] [\fB\-c=\fIfile\fR\fR] {\fBadd\ \fIfile\fR...\fR | \fBgencaches\fR | \fBshowpkg\ \fIpkg\fR...\fR | \fBshowsrc\ \fIpkg\fR...\fR | \fBstats\fR | \fBdump\fR | \fBdumpavail\fR | \fBunmet\fR | \fBsearch\ \fIregex\fR\fR | \fBshow\ \fIpkg\fR...\fR | \fBdepends\ \fIpkg\fR...\fR | \fBrdepends\ \fIpkg\fR...\fR | \fBpkgnames\ \fIprefix\fR\fR | \fBdotty\ \fIpkg\fR...\fR | \fBpolicy\ \fIpkgs\fR...\fR | \fBmadison\ \fIpkgs\fR...\fR}
14
\fBapt-cache\fR performs a variety of operations on APT's package
15
cache. \fBapt-cache\fR does not manipulate the state of the system
16
but does provide operations to search and generate interesting output
17
from the package metadata.
19
Unless the \fB-h\fR, or \fB--help\fR option is given one of the
20
commands below must be present.
23
add adds the names package index files to the package cache.
26
gencaches performs the same opration as
27
\fBapt-get check\fR. It builds the source and package caches from
28
the sources in \fB\fIsources.list\fB\fR(5) and from \fI/var/lib/dpkg/status\fR.
31
showpkg displays information about the packages listed on the
32
command line. Remaining arguments are package names. The available
33
versions and reverse dependencies of each package listed are listed, as
34
well as forward dependencies for each version. Forward (normal)
35
dependencies are those packages upon which the package in question
36
depends; reverse dependencies are those packages that depend upon the
37
package in question. Thus, forward dependencies must be satisfied for a
38
package, but reverse dependencies need not be.
39
For instance, \fBapt-cache showpkg libreadline2\fR would produce
40
output similar to the following:
34
\fBapt\-cache\fR performs a variety of operations on APT's package cache\&. \fBapt\-cache\fR does not manipulate the state of the system but does provide operations to search and generate interesting output from the package metadata\&.
37
Unless the \fB\-h\fR, or \fB\-\-help\fR option is given, one of the commands below must be present\&.
41
add adds the named package index files to the package cache\&. This is for debugging only\&.
45
gencaches performs the same operation as \fBapt\-get check\fR\&. It builds the source and package caches from the sources in \fB\fIsources\&.list\fR\fR(5) and from \fI/var/lib/dpkg/status\fR\&.
49
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, \fBapt\-cache showpkg libreadline2\fR would produce output similar to the following:
44
56
Package: libreadline2
45
Versions: 2.1-12(/var/state/apt/lists/foo_Packages),
57
Versions: 2\&.1\-12(/var/state/apt/lists/foo_Packages),
47
59
libreadlineg2,libreadline2
48
libreadline2-altdev,libreadline2
60
libreadline2\-altdev,libreadline2
50
2.1-12 - libc5 (2 5.4.0-0) ncurses3.0 (0 (null))
62
2\&.1\-12 \- libc5 (2 5\&.4\&.0\-0) ncurses3\&.0 (0 (null))
68
Thus it may be seen that libreadline2, version 2\&.1\-12, depends on libc5 and ncurses3\&.0 which must be installed for libreadline2 to work\&. In turn, libreadlineg2 and libreadline2\-altdev depend on libreadline2\&. If libreadline2 is installed, libc5 and ncurses3\&.0 (and ldso) must also be installed; libreadlineg2 and libreadline2\-altdev do not have to be installed\&. For the specific meaning of the remainder of the output it is best to consult the apt source code\&.
57
Thus it may be seen that libreadline2, version 2.1-12, depends on libc5 and
58
ncurses3.0 which must be installed for libreadline2 to work.
59
In turn, libreadlineg2 and libreadline2-altdev depend on libreadline2. If
60
libreadline2 is installed, libc5, ncurses3.0, and ldso must also be
61
installed; libreadlineg2 and libreadline2-altdev do not have to be
62
installed. For the specific meaning of the remainder of the output it
63
is best to consult the apt source code.
66
stats displays some statistics about the cache.
67
No further arguments are expected. Statistics reported are:
72
stats displays some statistics about the cache\&. No further arguments are expected\&. Statistics reported are:
71
Total package names is the number of package names found
75
Normal packages is the number of regular, ordinary package
76
names; these are packages that bear a one-to-one correspondence between
77
their names and the names used by other packages for them in
78
dependencies. The majority of packages fall into this category.
81
Pure virtual packages is the number of packages that exist
82
only as a virtual package name; that is, packages only "provide" the
83
virtual package name, and no package actually uses the name. For
84
instance, "mail-transport-agent" in the Debian GNU/Linux system is a
85
pure virtual package; several packages provide "mail-transport-agent",
86
but there is no package named "mail-transport-agent".
89
Single virtual packages is the number of packages with only
90
one package providing a particular virtual package. For example, in the
91
Debian GNU/Linux system, "X11-text-viewer" is a virtual package, but
92
only one package, xless, provides "X11-text-viewer".
95
Mixed virtual packages is the number of packages that either
96
provide a particular virtual package or have the virtual package name
97
as the package name. For instance, in the Debian GNU/Linux system,
98
debconf is both an actual package, and provided by the debconf-tiny
102
Missing is the number of package names that were referenced in
103
a dependency but were not provided by any package. Missing packages may
104
be in evidence if a full distribution is not accesssed, or if a package
105
(real or virtual) has been dropped from the distribution. Usually they
106
are referenced from Conflicts statements.
109
Total distinct versions is the number of package versions
110
found in the cache; this value is therefore at least equal to the
111
number of total package names. If more than one distribution (both
112
"stable" and "unstable", for instance), is being accessed, this value
113
can be considerably larger than the number of total package names.
116
Total dependencies is the number of dependency relationships
117
claimed by all of the packages in the cache.
77
Total package names is the number of package names found in the cache\&.
80
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\&.
83
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"\&.
86
Single virtual packages is the number of packages with only one package providing a particular virtual package\&. For example, in the Debian GNU/Linux system, "X11\-text\-viewer" is a virtual package, but only one package, xless, provides "X11\-text\-viewer"\&.
89
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, "debconf" is both an actual package, and provided by the debconf\-tiny package\&.
92
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 accessed, or if a package (real or virtual) has been dropped from the distribution\&. Usually they are referenced from Conflicts statements\&.
95
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\&.
98
Total dependencies is the number of dependency relationships claimed by all of the packages in the cache\&.
122
dump shows a short listing of every package in the cache. It is
123
primarily for debugging.
126
dumpavail prints out an available list to stdout. This is
127
suitable for use with \fBdpkg\fR(8) and is used by the \fBdselect\fR(8) method.
130
unmet displays a summary of all unmet dependencies in the
134
show performs a function similar to
135
\fBdpkg --print-avail\fR, it displays the package records for the
139
search performs a full text search on all available package
140
files for the regex pattern given. It searchs the package names and the
141
descriptions for an occurance of the string and prints out the package
142
name and the short description. If \fB--full\fR is given then output
143
identical to show is produced for each matched package and
144
if \fB--names-only\fR is given then the long description is not
145
searched, only the package name is.
147
Seperate arguments can be used to specified multiple search patterns that
151
depends shows a listing of each dependency a package has
152
and all the possible other packages that can fullfill that dependency.
155
This command prints the name of each package in the system. The optional
156
argument is a prefix match to filter the name list. The output is suitable
157
for use in a shell tab complete function and the output is generated
158
extremly quickly. This command is best used with the
159
\fB--generate\fR option.
162
dotty takes a list of packages on the command line and
163
gernerates output suitable for use by dotty from the
164
GraphVis <URL:http://www.research.att.com/sw/tools/graphviz/>
165
package. The result will be a set of nodes and edges representing the
166
relationships between the packages. By default the given packages will
167
trace out all dependent packages which can produce a very large graph.
168
This can be turned off by setting the
169
APT::Cache::GivenOnly option.
171
The resulting nodes will have several shapse, normal packages are boxes,
172
pure provides are triangles, mixed provides are diamonds,
173
hexagons are missing packages. Orange boxes mean recursion was stopped
174
[leaf packages], blue lines are prre-depends, green lines are conflicts.
176
Caution, dotty cannot graph larger sets of packages.
179
policy is ment to help debug issues relating to the
180
preferences file. With no arguments it will print out the
181
priorities of each source. Otherwise it prints out detailed information
182
about the priority selection of the named package.
106
showsrc 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\&.
110
dump shows a short listing of every package in the cache\&. It is primarily for debugging\&.
114
dumpavail prints out an available list to stdout\&. This is suitable for use with \fB\fBdpkg\fR\fR(8) and is used by the \fB\fBdselect\fR\fR(8) method\&.
118
unmet displays a summary of all unmet dependencies in the package cache\&.
122
show performs a function similar to \fBdpkg \-\-print\-avail\fRi; it displays the package records for the named packages\&.
125
search \fIregex [ regex \&.\&.\&. ]\fR
126
search performs a full text search on all available package lists for the regex pattern given\&. It searches the package names and the descriptions for an occurrence of the regular expression and prints out the package name and the short description\&. If \fB\-\-full\fR is given then output identical to show is produced for each matched package, and if \fB\-\-names\-only\fR is given then the long description is not searched, only the package name is\&.
128
Separate arguments can be used to specify multiple search patterns that are and'ed together\&.
132
depends shows a listing of each dependency a package has and all the possible other packages that can fulfill that dependency\&.
135
rdepends \fIpkg(s)\fR
136
rdependsshows a listing of each reverse dependency a package has\&.
139
pkgnames \fI[ prefix ]\fR
140
This command prints the name of each package in the system\&. The optional argument is a prefix match to filter the name list\&. The output is suitable for use in a shell tab complete function and the output is generated extremely quickly\&. This command is best used with the \fB\-\-generate\fR option\&.
144
dotty takes a list of packages on the command line and generates output suitable for use by dotty from the GraphViz: \fIhttp://www.research.att.com/sw/tools/graphviz/\fR package\&. The result will be a set of nodes and edges representing the relationships between the packages\&. By default the given packages will trace out all dependent packages; this can produce a very large graph\&. To limit the output to only the packages listed on the command line, set the APT::Cache::GivenOnly option\&.
146
The resulting nodes will have several shapes; normal packages are boxes, pure provides are triangles, mixed provides are diamonds, missing packages are hexagons\&. Orange boxes mean recursion was stopped [leaf packages], blue lines are pre\-depends, green lines are conflicts\&.
148
Caution, dotty cannot graph larger sets of packages\&.
151
policy \fI[ pkg(s) ]\fR
152
policy is meant to help debug issues relating to the preferences file\&. With no arguments it will print out the priorities of each source\&. Otherwise it prints out detailed information about the priority selection of the named package\&.
155
madison \fI/[ pkg(s) ]\fR
156
apt\-cache's madison command attempts to mimic the output format and a subset of the functionality of the Debian archive management tool, madison\&. It displays available versions of a package in a tabular format\&. Unlike the original madison, it can only display information for the architecture for which APT has retrieved package lists (APT::Architecture)\&.
186
All command line options may be set using the configuration file, the
187
descriptions indicate the configuration option to set. For boolean
188
options you can override the config file by using something like
189
\fB-f-\fR,\fB--no-f\fR, \fB-f=no\fR or several other variations.
194
Select the file to store the package cache. The package cache is the
195
primary cache used by all operations.
196
Configuration Item: Dir::Cache::pkgcache.
201
Select the file to store the source cache. The source is used only by
202
gencaches and it stores a parsed version of the package
203
information from remote sources. When building the package cache the
204
source cache is used to advoid reparsing all of the package files.
205
Configuration Item: Dir::Cache::srcpkgcache.
210
Quiet; produces output suitable for logging, omitting progress indicators.
211
More qs will produce more quite up to a maximum of 2. You can also use
212
\fB-q=#\fR to set the quiet level, overriding the configuration file.
213
Configuration Item: quiet.
218
Print only important deps; for use with unmet causes only Depends and
219
Pre-Depends relations to be printed.
220
Configuration Item: APT::Cache::Important.
225
Print full package records when searching.
226
Configuration Item: APT::Cache::ShowFull.
231
Print full records for all available versions, this is only applicable to
233
Configuration Item: APT::Cache::AllVersions.
238
Perform automatic package cache regeneration, rather than use the cache
239
as it is. This is the default, to turn it off use \fB--no-generate\fR.
240
Configuration Item: APT::Cache::Generate.
243
Only search on the package names, not the long description.
244
Configuration Item: APT::Cache::NamesOnly.
247
Make pkgnames print all names, including virtual packages
248
and missing dependencies.
249
Configuration Item: APT::Cache::AllNames.
252
Make depends recursive so that all packages mentioned are
254
Configuration Item: APT::Cache::RecurseDepends.
259
Show a short usage summary.
264
Show the program verison.
269
Configuration File; Specify a configuration file to use.
270
The program will read the default configuration file and then this
271
configuration file. See \fB\fIapt.conf\fB\fR(5) for syntax information.
276
Set a Configuration Option; This will set an arbitary configuration
277
option. The syntax is \fB-o Foo::Bar=bar\fR.
161
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 \fB\-f\-\fR,\fB\-\-no\-f\fR, \fB\-f=no\fR or several other variations\&.
164
\fB\-p\fR, \fB\-\-pkg\-cache\fR,
165
Select the file to store the package cache\&. The package cache is the primary cache used by all operations\&. Configuration Item: Dir::Cache::pkgcache\&.
168
\fB\-s\fR, \fB\-\-src\-cache\fR,
169
Select the file to store the source cache\&. The source is used only by gencaches and it stores a parsed version of the package information from remote sources\&. When building the package cache the source cache is used to advoid reparsing all of the package files\&. Configuration Item: Dir::Cache::srcpkgcache\&.
172
\fB\-q\fR, \fB\-\-quiet\fR,
173
Quiet; produces output suitable for logging, omitting progress indicators\&. More q's will produce more quietness up to a maximum of 2\&. You can also use \fB\-q=#\fR to set the quietness level, overriding the configuration file\&. Configuration Item: quiet\&.
176
\fB\-i\fR, \fB\-\-important\fR,
177
Print only important dependencies; for use with unmet\&. Causes only Depends and Pre\-Depends relations to be printed\&. Configuration Item: APT::Cache::Important\&.
180
\fB\-f\fR, \fB\-\-full\fR,
181
Print full package records when searching\&. Configuration Item: APT::Cache::ShowFull\&.
184
\fB\-a\fR, \fB\-\-all\-versions\fR,
185
Print full records for all available versions\&. This is the default; to turn it off, use \fB\-\-no\-all\-versions\fR\&. If \fB\-\-no\-all\-versions\fR is specified, only the candidate version will displayed (the one which would be selected for installation)\&. This option is only applicable to the show command\&. Configuration Item: APT::Cache::AllVersions\&.
188
\fB\-g\fR, \fB\-\-generate\fR,
189
Perform automatic package cache regeneration, rather than use the cache as it is\&. This is the default; to turn it off, use \fB\-\-no\-generate\fR\&. Configuration Item: APT::Cache::Generate\&.
192
\fB\-\-names\-only\fR, \fB\-n\fR,
193
Only search on the package names, not the long descriptions\&. Configuration Item: APT::Cache::NamesOnly\&.
197
Make pkgnames print all names, including virtual packages and missing dependencies\&. Configuration Item: APT::Cache::AllNames\&.
201
Make depends and rdepends recursive so that all packages mentioned are printed once\&. Configuration Item: APT::Cache::RecurseDepends\&.
205
Limit the output of depends and rdepends to packages which are currently installed\&. Configuration Item: APT::Cache::Installed\&.
208
\fB\-h\fR, \fB\-\-help\fR,
209
Show a short usage summary\&.
212
\fB\-v\fR, \fB\-\-version\fR,
213
Show the program version\&.
216
\fB\-c\fR, \fB\-\-config\-file\fR,
217
Configuration File; Specify a configuration file to use\&. The program will read the default configuration file and then this configuration file\&. See \fB\fIapt\&.conf\fR\fR(5) for syntax information\&.
220
\fB\-o\fR, \fB\-\-option\fR,
221
Set a Configuration Option; This will set an arbitary configuration option\&. The syntax is \fB\-o Foo::Bar=bar\fR\&.
280
\fB\fI/etc/apt/sources.list\fB\fR
281
locations to fetch packages from.
282
Configuration Item: Dir::Etc::SourceList.
284
\fB\fI/var/lib/apt/lists/\fB\fR
285
storage area for state information for each package resource specified in
286
\fB\fIsources.list\fB\fR(5)
287
Configuration Item: Dir::State::Lists.
289
\fB\fI/var/lib/apt/lists/partial/\fB\fR
290
storage area for state information in transit.
291
Configuration Item: Dir::State::Lists (implicit partial).
226
\fI/etc/apt/sources\&.list\fR
227
Locations to fetch packages from\&. Configuration Item: Dir::Etc::SourceList\&.
230
\fI/var/lib/apt/lists/\fR
231
Storage area for state information for each package resource specified in \fB\fIsources\&.list\fR\fR(5) Configuration Item: Dir::State::Lists\&.
234
\fI/var/lib/apt/lists/partial/\fR
235
Storage area for state information in transit\&. Configuration Item: Dir::State::Lists (implicit partial)\&.
294
\fB\fIapt.conf\fB\fR(5), \fB\fIsources.list\fB\fR(5), \fBapt-get\fR(8)
240
\fB\fIapt\&.conf\fR\fR(5), \fB\fIsources\&.list\fR\fR(5), \fB\fBapt\-get\fR\fR(8)
295
242
.SH "DIAGNOSTICS"
297
\fBapt-cache\fR returns zero on normal operation, decimal 100 on error.
245
\fBapt\-cache\fR returns zero on normal operation, decimal 100 on error\&.
300
See the APT bug page <URL:http://bugs.debian.org/apt>.
301
If you wish to report a bug in APT, please see
302
\fI/usr/share/doc/debian/bug-reporting.txt\fR or the \fBbug\fR(1) command.
305
APT was written by the APT team <apt@packages.debian.org>.
250
APT bug page: \fIhttp://bugs.debian.org/src:apt\fR\&. If you wish to report a bug in APT, please see \fI/usr/share/doc/debian/bug\-reporting\&.txt\fR or the \fB\fBreportbug\fR\fR(1) command\&.
253
Jason Gunthorpe, APT team.