Fixed or handling bug
[ntk/apt.git] / doc / apt-cache.8.yo
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)
4
5 manpagesynopsis()
6 apt-cache command [argument ...]
7
8 manpagedescription()
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.
12
13 em(command) is one of:
14 itemize(
15 it() add file1 [file2] [...]
16 it() gencaches
17 it() showpkg package1 [package2] [...]
18 it() stats
19 it() dump
20 it() dumpavail
21 it() unmet
22 it() check
23 it() search
24 it() show
25 it() showpkg
26 it() depends
27 it() pkgnames
28 it() dotty
29 )
30
31 Unless the -h, or --help option is given one of the above commands
32 must be present.
33
34 startdit()
35 dit(bf(add))
36 bf(add) adds the names package index files to the package cache.
37
38 dit(bf(gencaches))
39 bf(gencaches) performs the same opration as bf(apt-get check). It builds
40 the source and package caches from thes sources in bf(/etc/apt/sources.list)
41 and from bf(/var/lib/dpkg/status).
42
43 dit(bf(showpkg))
44 bf(showpkg) displays information about the packages listed on the
45 command line. Remaining arguments are package names. The available versions
46 and reverse dependencies of each package listed are listed, as well as
47 forward dependencies for each version. Forward (normal) dependencies
48 are those packages upon which the package in question depends; reverse
49 dependencies are those packages that depend upon the package in
50 question. Thus, forward dependencies must be satisfied for a package,
51 but reverse dependencies need not be.
52 For instance, bf(apt-cache showpkg libreadline2) would produce output similar
53 to the following:
54
55 verb(
56 Package: libreadline2
57
58 Versions:
59
60 2.1-12(/var/state/apt/lists/debian.midco.net_debian_dists_slink_main_binary-i386_Packages),
61
62 Reverse Depends:
63
64 libreadlineg2,libreadline2
65
66 libreadline2-altdev,libreadline2
67 Dependencies:
68
69 2.1-12 - libc5 (2 5.4.0-0) ncurses3.0 (0 (null)) ldso (2 1.9.0-1)
70
71 Provides:
72
73 2.1-12 -
74
75 Reverse Provides:
76 )
77
78 Thus it may be seen that libreadline2, version 2.1-8, depends on libc5,
79 ncurses3.0, and ldso, which must be installed for libreadline2 to work. In
80 turn, libreadlineg2 and libreadline2-altdev depend on libreadline2. If
81 libreadline2 is installed, libc5, ncurses3.0, and ldso must also be
82 installed; libreadlineg2 and libreadline2-altdev do not have to be
83 installed. For the specific meaning of the remainder of the output it
84 is best to consult the apt source code.
85
86 dit(bf(stats))
87 bf(stats) displays some statistics about bf(cache).
88 No further arguments are expected. Statistics reported are:
89 itemize(
90 it() bf(Total package names) is the number of package names found in the cache.
91
92 it() bf(Normal packages) is the number of regular, ordinary package names; these
93 are packages that bear a one-to-one correspondence between their names and
94 the names used by other packages for them in dependencies. The majority of
95 packages fall into this category.
96
97 it() bf(Pure virtual packages) is the number of packages that exist only as
98 a virtual package name; that is, packages only "provide" the virtual
99 package name, and no package actually uses the name. For instance,
100 "mail-transport-agent" in the Debian GNU/Linux system is a pure virtual
101 package; several packages provide "mail-transport-agent", but there is no
102 package named "mail-transport-agent".
103
104 it() bf(Single virtual packages) is the number of packages with only one
105 package providing a particular virtual package. For example, in the
106 Debian GNU/Linux system, "X11-text-viewer" is a virtual package, but only
107 one package, xless, provides "X11-text-viewer".
108
109 it() bf(Mixed virtual packages) is the number of packages that either provide
110 a particular virtual package or have the virtual package name as the
111 package name. For instance, in the Debian GNU/Linux system, e2fsprogs is
112 both an actual package, and provided by the e2compr package.
113
114 it() bf(Missing) is the number of package names that were referenced in a
115 dependency but were not provided by any package. Missing packages may be
116 in evidence if a full distribution is not accesssed, or if a package
117 (real or virtual) has been dropped from the distribution.
118
119 it() bf(Total distinct) versions is the number of package versions found in
120 the cache; this value is therefore at least equal to the number of total
121 package names. If more than one distribution (both "stable" and "unstable",
122 for instance), is being accessed, this value can be considerably larger
123 than the number of total package names.
124
125 it() bf(Total dependencies) is the number of dependency relationships claimed
126 by all of the packages in the cache.
127 )
128
129 dit(bf(dump))
130 bf(dump) shows a short listing of every package in the cache. It is primarily
131 for debugging.
132
133 dit(bf(dumpavail))
134 bf(dumpavail) prints out an available list to stdout. This is suitable for use
135 with bf(dpkg) and is used by the bf(dselect) method.
136
137 dit(bf(unmet))
138 bf(unmet) displays a summary of all unmet dependencies in the package cache.
139
140 dit(bf(check))
141 bf(check) is a random function for testing certain aspects of the cache.
142 Do not use it.
143
144 dit(bf(showpkg))
145 bf(showpkg) displays a listing of the given package cache structure and some
146 related information about it. The list is meant primarily for debugging.
147
148 dit(bf(show))
149 bf(show) performs a function similar to dpkg --print-avail, it displays
150 the package records for the named packages.
151
152 dit(bf(search))
153 bf(search) performs a full text search on all available package files for
154 the pattern given. It searchs the package names and the descriptions for
155 an occurance of the string and prints out the package name and the short
156 description. If --full is given then output identical to bf(show) is produced
157 for each matched package and if --names-only is given then the long
158 description is not searched, only the package name is.
159
160 dit(bf(depends))
161 bf(depends) shows a listing of each dependency a package has and all
162 the possible other packages that can fullfill that dependency.
163
164 dit(bf(pkgnames))
165 This command prints the name of each package in the system. The optional
166 argument is a prefix match to filter the name list. The output is suitable
167 for use in a shell tab complete function and the output is generated extremly
168 quickly. This command is best used with the bf(--no-generate) option.
169
170 dit(bf(dotty))
171 bf(dotty) Takes a list of packages on the command line and gernerates output
172 suitable for use by dotty from the GraphVis
173 (http://www.research.att.com/sw/tools/graphviz/) package. The result will be
174 a set of nodes and edges representing the relationships between the
175 packages. By default the given packages will trace out all dependent packages
176 which can produce a very large graph. This can be turned off by setting the
177 APT::Cache::GivenOnly option.
178
179 The resulting nodes will have several shapse, normal packages are boxes,
180 pure provides are triangles, mixed provides are diamonds,
181 hexagons are missing packages. Orange boxes mean recursion was stopped
182 [leaf packages], blue lines are prre-depends, green lines are conflicts.
183
184 Caution, dotty cannot graph larger sets of packages.
185
186 enddit()
187
188 manpageoptions()
189 All command line options may be set using the configuration file, the
190 descriptions indicate the configuration option to set. For boolean
191 options you can override the config file by using something like bf(-f-),
192 bf(--no-f), bf(-f=no) or several other variations.
193
194 startdit()
195 dit(bf(-h, --help))
196 Show a short usage summary.
197
198 dit(bf(-v, --version))
199 Show the program verison.
200
201 dit(bf(-p --pkg-cache))
202 Select the file to store the package cache. The package cache is the primary
203 cache used by all operations.
204 Configuration Item: bf(Dir::Cache::pkgcache).
205
206 dit(bf(-s --src-cache))
207 Select the file to store the source cache. The source is used only by
208 bf(gencaches) and it stores a parsed version of the package information from
209 remote sources. When building the package cache the source cache is used
210 to advoid reparsing all of the package files.
211 Configuration Item: bf(Dir::Cache::srcpkgcache).
212
213 dit(bf(-q, --quiet))
214 Quiet; produces output suitable for logging, omitting progress indicators.
215 More qs will produce more quite up to a maximum of 2. You can also use
216 bf(-q=#) to set the quiet level, overriding the configuration file.
217 Configuration Item: bf(quiet).
218
219 dit(bf(-i --important))
220 Print only important deps; for use with unmet causes only em(Depends) and
221 em(Pre-Depends) relations to be printed.
222 Configuration Item: bf(APT::Cache::Important).
223
224 dit(bf(-f --full))
225 Print full package records when searching. Configuration Item: bf(APT::Cache::ShowFull).
226
227 dit(bf(-a --all-versions))
228 Print full records for all available versions, this is only applicable to the
229 show command. Configuration Item: bf(APT::Cache::AllVersions)
230
231 dit(bf(-g --no-generate))
232 Do not perform automatic package cache regeneration, use the cache as it is.
233 Configuration Item: bf(APT::Cache::NoGenerate).
234
235 dit(bf(--names-only))
236 Only search on the package names, not the long description.
237 Configuration Item: bf(APT::Cache::NamesOnly).
238
239 dit(bf(--all-names))
240 Make bf(pkgnames) print all names, including virtual packages and missing
241 dependencies. Configuration Item: bf(APT::Cache::AllNames).
242
243 dit(bf(-c, --config-file))
244 Configuration File; Specify a configuration file to use. bf(apt-get) will
245 read the default configuration file and then this configuration file. See
246 bf(apt.conf(5)) for syntax information.
247
248 dit(bf(-o, --option))
249 Set a Configuration Option; This will set an arbitary configuration option.
250 The syntax is
251 verb(-o Foo::Bar=bar)
252 enddit()
253
254 manpagefiles()
255 itemize(
256 it() /etc/apt/sources.list
257 locations to fetch packages from
258
259 it() /var/state/apt/lists/
260 storage area for state information for each package resource specified in
261
262 it() /var/state/apt/lists/partial/
263 storage area for state information in transit
264 )
265
266 manpageseealso()
267 apt-get(8),
268 sources.list(5),
269 apt.conf(5)
270
271 manpagediagnostics()
272 apt-cache returns zero on normal operation, decimal 100 on error.
273
274 manpagebugs()
275 See http://bugs.debian.org/apt. If you wish to report a
276 bug in bf(apt-cache), please see bf(/usr/doc/debian/bug-reporting.txt)
277 or the bf(bug(1)) command.
278
279 manpageauthor()
280 apt-get was written by the APT team <apt@packages.debian.org>.