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