1APT-CACHE(8)                                                      APT-CACHE(8)
2
3
4

NAME

6       apt-cache - APT package handling utility -- cache manipulator
7

SYNOPSIS

9       apt-cache  [ -hvsn ] [ -o=config string ] [ -c=file ] { add  file ... |
10       gencaches | showpkg  pkg ... | showsrc   pkg  ...  |  stats  |  dump  |
11       dumpavail  | unmet | search  regex | show  pkg ... | depends  pkg ... |
12       whatdepends  pkg ... | pkgnames  prefix | dotty  pkg ... | policy  pkgs
13       ... }
14
15

DESCRIPTION

17       apt-cache performs a variety of operations on APT's package cache. apt-
18       cache does not manipulate the state of  the  system  but  does  provide
19       operations  to  search and generate interesting output from the package
20       metadata.
21
22       Unless the -h, or --help option is given, one  of  the  commands  below
23       must be present.
24
25       add file(s)
26              add  adds  the  named  package index files to the package cache.
27              This is for debugging only.
28
29       gencaches
30              gencaches performs the  same  operation  as  apt-get  check.  It
31              builds  the  source  and  package  caches  from  the  sources in
32              sources.list(5) and from /var/lib/dpkg/status.
33
34       showpkg pkg(s)
35              showpkg displays information about the packages  listed  on  the
36              command  line. Remaining arguments are package names. The avail‐
37              able versions and reverse dependencies of  each  package  listed
38              are  listed,  as  well as forward dependencies for each version.
39              Forward (normal) dependencies are those packages upon which  the
40              package  in  question  depends;  reverse  dependencies are those
41              packages that depend upon the package in question. Thus, forward
42              dependencies must be satisfied for a package, but reverse depen‐
43              dencies need not be.  For instance, apt-cache  showpkg  libread‐
44              line2 would produce output similar to the following:
45
46
47              Package: libreadline2
48              Versions: 2.1-12(/var/lib/apt/lists/foo_Packages),
49              Reverse Depends:
50                libreadlineg2,libreadline2
51                libreadline2-altdev,libreadline2
52              Dependencies:
53              2.1-12 - libc5 (2 5.4.0-0) ncurses3.0 (0 (null))
54              Provides:
55              2.1-12 -
56              Reverse Provides:
57
58              Thus  it  may be seen that libreadline2, version 2.1-12, depends
59              on libc5 and ncurses3.0 which must be installed for libreadline2
60              to  work.  In turn, libreadlineg2 and libreadline2-altdev depend
61              on  libreadline2.  If  libreadline2  is  installed,  libc5   and
62              ncurses3.0  (and ldso) must also be installed; libreadlineg2 and
63              libreadline2-altdev do not have to be installed.  For  the  spe‐
64              cific  meaning of the remainder of the output it is best to con‐
65              sult the apt source code.
66
67       stats  stats displays some statistics  about  the  cache.   No  further
68              arguments are expected. Statistics reported are:
69
70              · Total  package  names  is the number of package names found in
71                the cache.
72
73              · Normal packages is the number  of  regular,  ordinary  package
74                names;  these  are  packages that bear a one-to-one correspon‐
75                dence between their names and the names used by other packages
76                for  them  in dependencies. The majority of packages fall into
77                this category.
78
79              · Pure virtual packages is the number  of  packages  that  exist
80                only  as  a virtual package name; that is, packages only "pro‐
81                vide" the virtual package name, and no package  actually  uses
82                the  name.  For instance, "mail-transport-agent" in the Debian
83                GNU/Linux system is a pure virtual package;  several  packages
84                provide  "mail-transport-agent", but there is no package named
85                "mail-transport-agent".
86
87              · Single virtual packages is the number of  packages  with  only
88                one  package providing a particular virtual package. For exam‐
89                ple, in the Debian GNU/Linux system,  "X11-text-viewer"  is  a
90                virtual   package,  but  only  one  package,  xless,  provides
91                "X11-text-viewer".
92
93              · Mixed virtual packages is the number of packages  that  either
94                provide a particular virtual package or have the virtual pack‐
95                age name as the package name.  For  instance,  in  the  Debian
96                GNU/Linux  system,  "debconf"  is  both an actual package, and
97                provided by the debconf-tiny package.
98
99              · Missing is the number of package names that were referenced in
100                a  dependency  but  were  not provided by any package. Missing
101                packages may be in evidence if  a  full  distribution  is  not
102                accessed,  or  if a package (real or virtual) has been dropped
103                from the distribution. Usually they are referenced  from  Con‐
104                flicts statements.
105
106              · Total  distinct  versions  is  the  number of package versions
107                found in the cache; this value is therefore at least equal  to
108                the  number of total package names. If more than one distribu‐
109                tion (both "stable" and "unstable", for  instance),  is  being
110                accessed,  this value can be considerably larger than the num‐
111                ber of total package names.
112
113              · Total dependencies is the number of  dependency  relationships
114                claimed by all of the packages in the cache.
115
116       showsrc pkg(s)
117              showsrc  displays  all the source package records that match the
118              given package names. All versions are  shown,  as  well  as  all
119              records that declare the name to be a Binary.
120
121       dump   dump  shows a short listing of every package in the cache. It is
122              primarily for debugging.
123
124       dumpavail
125              dumpavail prints out an available list to stdout. This is  suit‐
126              able for use with dpkg(8) and is used by the dselect(8) method.
127
128       unmet  unmet  displays a summary of all unmet dependencies in the pack‐
129              age cache.
130
131       show pkg(s)
132              show performs a function similar to dpkg --print-availi; it dis‐
133              plays the package records for the named packages.
134
135       search regex [ regex ... ]
136              search  performs  a  full  text  search on all available package
137              lists for the regex pattern given. It searches the package names
138              and the descriptions for an occurrence of the regular expression
139              and prints out the package name and the  short  description.  If
140              --full  is  given  then output identical to show is produced for
141              each matched package, and if --names-only is given then the long
142              description is not searched, only the package name is.
143
144              Separate  arguments  can be used to specify multiple search pat‐
145              terns that are and'ed together.
146
147       depends pkg(s)
148              depends shows a listing of each dependency a package has and all
149              the possible other packages that can fulfill that dependency.
150
151       whatdepends pkg(s)
152              whatdepends shows a listing of what depends on a package.
153
154       pkgnames [ prefix ]
155              This  command prints the name of each package in the system. The
156              optional argument is a prefix match to filter the name list. The
157              output  is suitable for use in a shell tab complete function and
158              the output is generated extremely quickly. This command is  best
159              used with the --generate option.
160
161       dotty pkg(s)
162              dotty takes a list of packages on the command line and generates
163              output  suitable  for   use   by   dotty   from   the   GraphViz
164              <URL:http://www.research.att.com/sw/tools/graphviz/>    package.
165              The result will be a set of nodes  and  edges  representing  the
166              relationships  between  the packages. By default the given pack‐
167              ages will trace out all dependent packages; this can  produce  a
168              very  large  graph.   To  limit  the output to only the packages
169              listed  on  the  command  line,  set  the  APT::Cache::GivenOnly
170              option.
171
172              The  resulting  nodes  will have several shapes; normal packages
173              are boxes, pure provides are triangles, mixed provides are  dia‐
174              monds,  missing  packages are hexagons. Orange boxes mean recur‐
175              sion was stopped [leaf packages], blue  lines  are  pre-depends,
176              green lines are conflicts.
177
178              Caution, dotty cannot graph larger sets of packages.
179
180       policy [ pkg(s) ]
181              policy  is ment to help debug issues relating to the preferences
182              file. With no arguments it will print out the priorities of each
183              source.  Otherwise  it prints out detailed information about the
184              priority selection of the named package.
185

OPTIONS

187       All command line options may be set using the configuration  file,  the
188       descriptions  indicate  the  configuration  option  to set. For boolean
189       options you can override  the  config  file  by  using  something  like
190       -f-,--no-f, -f=no or several other variations.
191
192       -p
193
194       --pkg-cache
195              Select the file to store the package cache. The package cache is
196              the primary cache used by all operations.   Configuration  Item:
197              Dir::Cache::pkgcache.
198
199       -s
200
201       --src-cache
202              Select  the  file  to store the source cache. The source is used
203              only by gencaches and it stores a parsed version of the  package
204              information from remote sources. When building the package cache
205              the source cache is used to advoid reparsing all of the  package
206              files.  Configuration Item: Dir::Cache::srcpkgcache.
207
208       -q
209
210       --quiet
211              Quiet;  produces  output suitable for logging, omitting progress
212              indicators.  More q's will produce more quietness up to a  maxi‐
213              mum  of  2.  You  can  also use -q=# to set the quietness level,
214              overriding the configuration file.  Configuration Item: quiet.
215
216       -i
217
218       --important
219              Print only important dependencies; for use  with  unmet.  Causes
220              only  Depends and Pre-Depends relations to be printed.  Configu‐
221              ration Item: APT::Cache::Important.
222
223       -f
224
225       --full Print full package records when searching.  Configuration  Item:
226              APT::Cache::ShowFull.
227
228       -a
229
230       --all-versions
231              Print  full  records  for  all  available  versions. This is the
232              default; to turn it off, use  --no-all-versions.   If  --no-all-
233              versions is specified, only the candidate version will displayed
234              (the one which would be selected for installation).  This option
235              is  only  applicable  to  the show command.  Configuration Item:
236              APT::Cache::AllVersions.
237
238       -g
239
240       --generate
241              Perform automatic package cache regeneration,  rather  than  use
242              the  cache  as  it  is. This is the default; to turn it off, use
243              --no-generate.  Configuration Item: APT::Cache::Generate.
244
245       --names-only
246
247       -n     Only search on the package names,  not  the  long  descriptions.
248              Configuration Item: APT::Cache::NamesOnly.
249
250       --all-names
251              Make  pkgnames  print  all names, including virtual packages and
252              missing dependencies.  Configuration Item: APT::Cache::AllNames.
253
254       --recurse
255              Make depends  recursive  so  that  all  packages  mentioned  are
256              printed once.  Configuration Item: APT::Cache::RecurseDepends.
257
258       -h
259
260       --help Show a short usage summary.
261
262       -v
263
264       --version
265              Show the program version.
266
267       -c
268
269       --config-file
270              Configuration  File;  Specify  a configuration file to use.  The
271              program will read the default configuration file and  then  this
272              configuration file. See apt.conf(5) for syntax information.
273
274       -o
275
276       --option
277              Set  a Configuration Option; This will set an arbitrary configu‐
278              ration option. The syntax is -o Foo::Bar=bar.
279

FILES

281       /etc/apt/sources.list
282              Locations  to  fetch   packages   from.    Configuration   Item:
283              Dir::Etc::SourceList.
284
285       /var/lib/apt/lists/
286              Storage  area  for  state  information for each package resource
287              specified     in     sources.list(5)     Configuration     Item:
288              Dir::State::Lists.
289
290       /var/lib/apt/lists/partial/
291              Storage  area  for  state information in transit.  Configuration
292              Item: Dir::State::Lists (implicit partial).
293

SEE ALSO

295       apt.conf(5), sources.list(5), apt-get(8)
296

DIAGNOSTICS

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

BUGS

301       See the APT bug page <URL:http://bugs.debian.org/src:apt>.  If you wish
302       to  report  a  bug in APT, please see /usr/share/doc/debian/bug-report‐
303       ing.txt or the reportbug(1) command.
304

AUTHOR

306       APT was written by the APT team <apt@packages.debian.org>.
307
308
309
310                                02 August 2007                    APT-CACHE(8)
Impressum