Debian Codegraph @

upstream/debian-trixie/man8/rpm.8

raw
1 .\" Automatically generated by Pandoc 3.1.11.1
2 .\"
3 .TH "RPM" "8" "09 June 2002" "" ""
4 .SH NAME
5 rpm \- RPM Package Manager
6 .SH SYNOPSIS
7 .SS QUERYING AND VERIFYING PACKAGES
8 \f[B]rpm\f[R] {\f[B]\-q|\-\-query\f[R]} [\f[B]select\-options\f[R]]
9 [\f[B]query\-options\f[R]]
10 .PP
11 \f[B]rpm\f[R] \f[B]\-\-querytags\f[R]
12 .PP
13 \f[B]rpm\f[R] {\f[B]\-V|\-\-verify\f[R]} [\f[B]select\-options\f[R]]
14 [\f[B]verify\-options\f[R]]
15 .SS INSTALLING, UPGRADING, AND REMOVING PACKAGES
16 \f[B]rpm\f[R] {\f[B]\-i|\-\-install\f[R]} [\f[B]install\-options\f[R]]
17 \f[I]PACKAGE_FILE ...\f[R]
18 .PP
19 \f[B]rpm\f[R] {\f[B]\-U|\-\-upgrade\f[R]} [\f[B]install\-options\f[R]]
20 \f[I]PACKAGE_FILE ...\f[R]
21 .PP
22 \f[B]rpm\f[R] {\f[B]\-F|\-\-freshen\f[R]} [\f[B]install\-options\f[R]]
23 \f[I]PACKAGE_FILE ...\f[R]
24 .PP
25 \f[B]rpm\f[R] {\f[B]\-\-reinstall\f[R]} [\f[B]install\-options\f[R]]
26 \f[I]PACKAGE_FILE ...\f[R]
27 .PP
28 \f[B]rpm\f[R] {\f[B]\-e|\-\-erase\f[R]} [\f[B]\-\-allmatches\f[R]]
29 [\f[B]\-\-justdb\f[R]] [\f[B]\-\-nodb\f[R]] [\f[B]\-\-nodeps\f[R]]
30 [\f[B]\-\-noscripts\f[R]] [\f[B]\-\-notriggers\f[R]]
31 [\f[B]\-\-test\f[R]] \f[I]PACKAGE_NAME ...\f[R]
32 .SS MISCELLANEOUS
33 \f[B]rpm\f[R] \f[B]\-\-showrc\f[R]
34 .PP
35 \f[B]rpm\f[R] \f[B]\-\-restore\f[R] [\f[B]select\-options\f[R]]
36 .SS select\-options
37 [\f[I]PACKAGE_NAME\f[R]] [\f[B]\-a,\-\-all [\f[R]\f[I]SELECTOR\f[R]]]
38 [\f[B]\-f,\-\-file\f[R] \f[I]FILE\f[R]] [\f[B]\-\-path\f[R]
39 \f[I]PATH\f[R]] [\f[B]\-g,\-\-group\f[R] \f[I]GROUP\f[R]]
40 [\f[B]\-p,\-\-package\f[R] \f[I]PACKAGE_FILE\f[R]] [\f[B]\-\-hdrid\f[R]
41 \f[I]SHA1\f[R]] [\f[B]\-\-pkgid\f[R] \f[I]MD5\f[R]] [\f[B]\-\-tid\f[R]
42 \f[I]TID\f[R]] [\f[B]\-\-querybynumber\f[R] \f[I]HDRNUM\f[R]]
43 [\f[B]\-\-triggeredby\f[R] \f[I]PACKAGE_NAME\f[R]]
44 [\f[B]\-\-whatprovides\f[R] \f[I]CAPABILITY\f[R]]
45 [\f[B]\-\-whatrequires\f[R] \f[I]CAPABILITY\f[R]]
46 [\f[B]\-\-whatrecommends\f[R] \f[I]CAPABILITY\f[R]]
47 [\f[B]\-\-whatsuggests\f[R] \f[I]CAPABILITY\f[R]]
48 [\f[B]\-\-whatsupplements\f[R] \f[I]CAPABILITY\f[R]]
49 [\f[B]\-\-whatenhances\f[R] \f[I]CAPABILITY\f[R]]
50 [\f[B]\-\-whatobsoletes\f[R] \f[I]CAPABILITY\f[R]]
51 [\f[B]\-\-whatconflicts\f[R] \f[I]CAPABILITY\f[R]]
52 .SS query\-options
53 General: [\f[B]\-\-changelog\f[R]] [\f[B]\-\-changes\f[R]]
54 [\f[B]\-\-dupes\f[R]] [\f[B]\-i,\-\-info\f[R]] [\f[B]\-\-last\f[R]]
55 [\f[B]\-\-qf,\-\-queryformat\f[R] \f[I]QUERYFMT\f[R]]
56 [\f[B]\-\-xml\f[R]] [\f[B]\-\-json\f[R]]
57 .PP
58 Dependencies: [\f[B]\-\-conflicts\f[R]] [\f[B]\-\-enhances\f[R]]
59 [\f[B]\-\-obsoletes\f[R]] [\f[B]\-\-provides\f[R]]
60 [\f[B]\-\-recommends\f[R]] [\f[B]\-R,\-\-requires\f[R]]
61 [\f[B]\-\-suggests\f[R]] [\f[B]\-\-supplements\f[R]]
62 .PP
63 Files: [\f[B]\-c,\-\-configfiles\f[R]] [\f[B]\-d,\-\-docfiles\f[R]]
64 [\f[B]\-\-dump\f[R]] [\f[B]\-\-fileclass\f[R]] [\f[B]\-\-filecolor\f[R]]
65 [\f[B]\-\-fileprovide\f[R]][\f[B]\-\-filerequire\f[R]]
66 [\f[B]\-\-filecaps\f[R]] [\f[B]\-\-filesbypkg\f[R]]
67 [\f[B]\-l,\-\-list\f[R]] [\f[B]\-s,\-\-state\f[R]]
68 [\f[B]\-\-noartifact\f[R]] [\f[B]\-\-noghost\f[R]]
69 [\f[B]\-\-noconfig\f[R]]
70 .PP
71 Scripts and triggers: [\f[B]\-\-filetriggers\f[R]]
72 [\f[B]\-\-scripts\f[R]] [\f[B]\-\-triggers,\-\-triggerscripts\f[R]]
73 .SS verify\-options
74 [\f[B]\-\-nodeps\f[R]] [\f[B]\-\-nofiles\f[R]] [\f[B]\-\-noscripts\f[R]]
75 [\f[B]\-\-nodigest\f[R]] [\f[B]\-\-nosignature\f[R]]
76 [\f[B]\-\-nolinkto\f[R]] [\f[B]\-\-nofiledigest\f[R]]
77 [\f[B]\-\-nosize\f[R]] [\f[B]\-\-nouser\f[R]] [\f[B]\-\-nogroup\f[R]]
78 [\f[B]\-\-nomtime\f[R]] [\f[B]\-\-nomode\f[R]] [\f[B]\-\-nordev\f[R]]
79 [\f[B]\-\-nocaps\f[R]]
80 .SS install\-options
81 [\f[B]\-\-allfiles\f[R]] [\f[B]\-\-badreloc\f[R]]
82 [\f[B]\-\-excludepath\f[R] \f[I]OLDPATH\f[R]]
83 [\f[B]\-\-excludedocs\f[R]] [\f[B]\-\-force\f[R]]
84 [\f[B]\-h,\-\-hash\f[R]] [\f[B]\-\-ignoresize\f[R]]
85 [\f[B]\-\-ignorearch\f[R]] [\f[B]\-\-ignoreos\f[R]]
86 [\f[B]\-\-includedocs\f[R]] [\f[B]\-\-justdb\f[R]] [\f[B]\[en]nodb\f[R]]
87 [\f[B]\-\-nodeps\f[R]] [\f[B]\-\-nodigest\f[R]]
88 [\f[B]\-\-noplugins\f[R]] [\f[B]\-\-nocaps\f[R]] [\f[B]\-\-noorder\f[R]]
89 [\f[B]\-\-noverify\f[R]] [\f[B]\-\-nosignature\f[R]]
90 [\f[B]\-\-noscripts\f[R]] [\f[B]\-\-notriggers\f[R]]
91 [\f[B]\-\-oldpackage\f[R]] [\f[B]\-\-percent\f[R]] [\f[B]\-\-prefix\f[R]
92 \f[I]NEWPATH\f[R]] [\f[B]\-\-relocate\f[R]
93 \f[I]OLDPATH\f[R]\f[B]=\f[R]\f[I]NEWPATH\f[R]]
94 [\f[B]\-\-replacefiles\f[R]] [\f[B]\-\-replacepkgs\f[R]]
95 [\f[B]\-\-test\f[R]]
96 .SH DESCRIPTION
97 \f[B]rpm\f[R] is a powerful \f[B]Package Manager\f[R], which can be used
98 to build, install, query, verify, update, and erase individual software
99 packages.
100 A \f[B]package\f[R] consists of an archive of files and meta\-data used
101 to install and erase the archive files.
102 The meta\-data includes helper scripts, file attributes, and descriptive
103 information about the package.
104 \f[B]Packages\f[R] come in two varieties: binary packages, used to
105 encapsulate software to be installed, and source packages, containing
106 the source code and recipe necessary to produce binary packages.
107 .PP
108 One of the following basic modes must be selected: \f[B]Query\f[R],
109 \f[B]Verify\f[R], \f[B]Install/Upgrade/Freshen/Reinstall\f[R],
110 \f[B]Uninstall\f[R], \f[B]Set Owners/Groups\f[R], \f[B]Show
111 Querytags\f[R], and \f[B]Show Configuration\f[R].
112 .SS GENERAL OPTIONS
113 These options can be used in all the different modes.
114 .TP
115 \f[B]\-?, \-\-help\f[R]
116 Print a longer usage message than normal.
117 .TP
118 \f[B]\-\-version\f[R]
119 Print a single line containing the version number of \f[B]rpm\f[R] being
120 used.
121 .TP
122 \f[B]\-\-quiet\f[R]
123 Print as little as possible \- normally only error messages will be
124 displayed.
125 .TP
126 \f[B]\-v, \-\-verbose\f[R]
127 Print verbose information \- normally routine progress messages will be
128 displayed.
129 .TP
130 \f[B]\-vv\f[R]
131 Print lots of ugly debugging information.
132 .TP
133 \f[B]\-\-rcfile\f[R] \f[I]FILELIST\f[R]
134 Replace the default list of configuration files to be read with
135 \f[I]FILELIST\f[R].
136 See \f[B]rpmrc Configuration\f[R] for details.
137 .TP
138 \f[B]\-\-load\f[R] \f[I]FILE\f[R]
139 Load an individual macro file.
140 .TP
141 \f[B]\-\-macros\f[R] \f[I]FILELIST\f[R]
142 Replace the list of macro files to be loaded with \f[I]FILELIST\f[R].
143 See \f[B]Macro Configuration\f[R] for details.
144 .TP
145 \f[B]\-\-pipe\f[R] \f[I]CMD\f[R]
146 Pipes the output of \f[B]rpm\f[R] to the command \f[I]CMD\f[R].
147 .TP
148 \f[B]\-\-dbpath\f[R] \f[I]DIRECTORY\f[R]
149 Use the database in \f[I]DIRECTORY\f[R] rather than the default path
150 \f[I]/var/lib/rpm\f[R].
151 .TP
152 \f[B]\-\-root\f[R] \f[I]DIRECTORY\f[R]
153 Use the file system tree rooted at \f[I]DIRECTORY\f[R] for all
154 operations.
155 Note that this means the database within \f[I]DIRECTORY\f[R] will be
156 used for dependency checks and any scriptlet(s) (e.g.\ \f[B]%post\f[R]
157 if installing, or \f[B]%prep\f[R] if building, a package) will be run
158 after a chroot(2) to \f[I]DIRECTORY\f[R].
159 .RS
160 .PP
161 Note that rpm assumes the environment inside the root is set up by the
162 caller, such as any mounts needed for the operation inside the root
163 directory.
164 .RE
165 .TP
166 \f[B]\-D, \-\-define=\[aq]\f[R]\f[I]MACRO EXPR\f[R]\f[B]\[aq]\f[R]
167 Defines \f[I]MACRO\f[R] with value \f[I]EXPR\f[R].
168 .TP
169 \f[B]\-\-undefine=\[aq]\f[R]\f[I]MACRO\f[R]\f[B]\[aq]\f[R]
170 Undefines \f[I]MACRO\f[R].
171 .TP
172 \f[B]\-E, \-\-eval=\[aq]\f[R]\f[I]EXPR\f[R]\f[B]\[aq]\f[R]
173 Prints macro expansion of \f[I]EXPR\f[R].
174 .PP
175 More \- less often needed \- options can be found on the
176 \f[B]rpm\-misc\f[R](8) man page.
177 .SS INSTALL AND UPGRADE OPTIONS
178 In these options, \f[I]PACKAGE_FILE\f[R] can be either \f[B]rpm\f[R]
179 binary file or ASCII package manifest (see \f[B]PACKAGE SELECTION
180 OPTIONS\f[R]), and may be specified as an \f[B]ftp\f[R] or
181 \f[B]http\f[R] URL, in which case the package will be downloaded before
182 being installed.
183 See \f[B]FTP/HTTP OPTIONS\f[R] for information on \f[B]rpm\f[R]\[aq]s
184 \f[B]ftp\f[R] and \f[B]http\f[R] client support.
185 .PP
186 The general form of an \f[B]rpm\f[R] install command is
187 .PP
188 \f[B]rpm\f[R] {\f[B]\-i|\-\-install\f[R]} [\f[B]install\-options\f[R]]
189 \f[I]PACKAGE_FILE ...\f[R]
190 .PP
191 This installs a new package.
192 .PP
193 The general form of an \f[B]rpm\f[R] upgrade command is
194 .PP
195 \f[B]rpm\f[R] {\f[B]\-U|\-\-upgrade\f[R]} [\f[B]install\-options\f[R]]
196 \f[I]PACKAGE_FILE ...\f[R]
197 .PP
198 This upgrades or installs the package currently installed to a newer
199 version.
200 This is the same as install, except all other version(s) of the package
201 are removed after the new package is installed.
202 .PP
203 \f[B]rpm\f[R] {\f[B]\-F|\-\-freshen\f[R]} [\f[B]install\-options\f[R]]
204 \f[I]PACKAGE_FILE ...\f[R]
205 .PP
206 This will upgrade packages, but only ones for which an earlier version
207 is installed.
208 .PP
209 The general form of an \f[B]rpm\f[R] reinstall command is
210 .PP
211 \f[B]rpm\f[R] {\f[B]\-\-reinstall\f[R]} [\f[B]install\-options\f[R]]
212 \f[I]PACKAGE_FILE ...\f[R]
213 .PP
214 This reinstalls a previously installed package.
215 .TP
216 \f[B]\-\-allfiles\f[R]
217 Installs or upgrades all the missingok files in the package, regardless
218 if they exist.
219 .TP
220 \f[B]\-\-badreloc\f[R]
221 Used with \f[B]\-\-relocate\f[R], permit relocations on all file paths,
222 not just those \f[I]OLDPATH\f[R]\[aq]s included in the binary package
223 relocation hint(s).
224 .TP
225 \f[B]\-\-excludepath\f[R] \f[I]OLDPATH\f[R]
226 Don\[aq]t install files whose name begins with \f[I]OLDPATH\f[R].
227 .TP
228 \f[B]\-\-excludeartifacts\f[R]
229 Don\[aq]t install any files which are marked as artifacts, such as
230 build\-id links.
231 .TP
232 \f[B]\-\-excludedocs\f[R]
233 Don\[aq]t install any files which are marked as documentation (which
234 includes man pages and texinfo documents).
235 .TP
236 \f[B]\-\-force\f[R]
237 Same as using \f[B]\-\-replacepkgs\f[R], \f[B]\-\-replacefiles\f[R], and
238 \f[B]\-\-oldpackage\f[R].
239 .TP
240 \f[B]\-h, \-\-hash\f[R]
241 Print 50 hash marks as the package archive is unpacked.
242 Use with \f[B]\-v|\-\-verbose\f[R] for a nicer display.
243 .TP
244 \f[B]\-\-ignoresize\f[R]
245 Don\[aq]t check mount file systems for sufficient disk space before
246 installing this package.
247 .TP
248 \f[B]\-\-ignorearch\f[R]
249 Allow installation or upgrading even if the architectures of the binary
250 package and host don\[aq]t match.
251 .TP
252 \f[B]\-\-ignoreos\f[R]
253 Allow installation or upgrading even if the operating systems of the
254 binary package and host don\[aq]t match.
255 .TP
256 \f[B]\-\-includedocs\f[R]
257 Install documentation files.
258 This is the default behavior.
259 .TP
260 \f[B]\-\-justdb\f[R]
261 Update only the database, not the filesystem.
262 .TP
263 \f[B]\-\-nodb\f[R]
264 Update only the filesystem, not the database.
265 .TP
266 \f[B]\-\-nodigest\f[R]
267 Don\[aq]t verify package or header digests when reading.
268 .TP
269 \f[B]\-\-nomanifest\f[R]
270 Don\[aq]t process non\-package files as manifests.
271 .TP
272 \f[B]\-\-nosignature\f[R]
273 Don\[aq]t verify package or header signatures when reading.
274 .TP
275 \f[B]\-\-nodeps\f[R]
276 Don\[aq]t do a dependency check before installing or upgrading a
277 package.
278 .TP
279 \f[B]\-\-nocaps\f[R]
280 Don\[aq]t set file capabilities.
281 .TP
282 \f[B]\-\-noorder\f[R]
283 Don\[aq]t reorder the packages for an install.
284 The list of packages would normally be reordered to satisfy
285 dependencies.
286 .TP
287 \f[B]\-\-noverify\f[R]
288 Don\[aq]t perform verify package files prior to installation.
289 .TP
290 \f[B]\-\-noplugins\f[R]
291 Do not load and execute plugins.
292 .TP
293 \f[B]\-\-noscripts\f[R], \f[B]\-\-nopre\f[R], \f[B]\-\-nopost\f[R], \f[B]\-\-nopreun\f[R], \f[B]\-\-nopostun\f[R], \f[B]\-\-nopretrans\f[R], \f[B]\-\-noposttrans\f[R], \f[B]\-\-nopreuntrans\f[R], \f[B]\-\-nopostuntrans\f[R]
294 Don\[aq]t execute the scriptlet of the same name.
295 The \f[B]\-\-noscripts\f[R] option is equivalent to
296 .PP
297 \f[B]\-\-nopre\f[R] \f[B]\-\-nopost\f[R] \f[B]\-\-nopreun\f[R]
298 \f[B]\-\-nopostun\f[R] \f[B]\-\-nopretrans\f[R]
299 \f[B]\-\-noposttrans\f[R] \f[B]\-\-nopreuntrans\f[R]
300 \f[B]\-\-nopostuntrans\f[R]
301 .PP
302 and turns off the execution of the corresponding \f[B]%pre\f[R],
303 \f[B]%post\f[R], \f[B]%preun\f[R], \f[B]%postun\f[R]
304 \f[B]%pretrans\f[R], \f[B]%posttrans\f[R], \f[B]%preuntrans\f[R] and
305 \f[B]%postuntrans\f[R] scriptlet(s).
306 .TP
307 \f[B]\-\-notriggers\f[R], \f[B]\-\-notriggerin\f[R], \f[B]\-\-notriggerun\f[R], \f[B]\-\-notriggerprein\f[R], \f[B]\-\-notriggerpostun\f[R]
308 Don\[aq]t execute any trigger scriptlet of the named type.
309 The \f[B]\-\-notriggers\f[R] option is equivalent to
310 .PP
311 \f[B]\-\-notriggerprein\f[R] \f[B]\-\-notriggerin\f[R]
312 \f[B]\-\-notriggerun\f[R] \f[B]\-\-notriggerpostun\f[R]
313 .PP
314 and turns off execution of the corresponding \f[B]%triggerprein\f[R],
315 \f[B]%triggerin\f[R], \f[B]%triggerun\f[R], and \f[B]%triggerpostun\f[R]
316 scriptlet(s).
317 .TP
318 \f[B]\-\-nosysusers\f[R]
319 Don\[cq]t create sysusers from packages
320 .TP
321 \f[B]\-\-oldpackage\f[R]
322 Allow an upgrade to replace a newer package with an older one.
323 .TP
324 \f[B]\-\-percent\f[R]
325 Print percentages as files are unpacked from the package archive.
326 This is intended to make \f[B]rpm\f[R] easy to run from other tools.
327 .TP
328 \f[B]\-\-prefix\f[R] \f[I]NEWPATH\f[R]
329 For relocatable binary packages, translate all file paths that start
330 with the installation prefix in the package relocation hint(s) to
331 \f[I]NEWPATH\f[R].
332 .TP
333 \f[B]\-\-relocate\f[R] \f[I]OLDPATH\f[R]\f[B]=\f[R]\f[I]NEWPATH\f[R]
334 For relocatable binary packages, translate all file paths that start
335 with \f[I]OLDPATH\f[R] in the package relocation hint(s) to
336 \f[I]NEWPATH\f[R].
337 This option can be used repeatedly if several \f[I]OLDPATH\f[R]\[aq]s in
338 the package are to be relocated.
339 .TP
340 \f[B]\-\-replacefiles\f[R]
341 Install the packages even if they replace files from other, already
342 installed, packages.
343 .TP
344 \f[B]\-\-replacepkgs\f[R]
345 Install the packages even if some of them are already installed on this
346 system.
347 .TP
348 \f[B]\-\-test\f[R]
349 Do not install the package, simply check for and report potential
350 conflicts.
351 .SS ERASE OPTIONS
352 The general form of an \f[B]rpm\f[R] erase command is
353 .PP
354 \f[B]rpm\f[R] {\f[B]\-e|\-\-erase\f[R]} [\f[B]\-\-allmatches\f[R]]
355 [\f[B]\-\-justdb] [\-\-nodeps\f[R]] [\f[B]\-\-noscripts\f[R]]
356 [\f[B]\-\-notriggers\f[R]] [\f[B]\-\-test\f[R]] \f[I]PACKAGE_NAME
357 \&...\f[R]
358 .PP
359 The following options may also be used:
360 .TP
361 \f[B]\-\-allmatches\f[R]
362 Remove all versions of the package which match \f[I]PACKAGE_NAME\f[R].
363 Normally an error is issued if \f[I]PACKAGE_NAME\f[R] matches multiple
364 packages.
365 .TP
366 \f[B]\-\-justdb\f[R]
367 Update only the database, not the filesystem.
368 .TP
369 \f[B]\-\-nodeps\f[R]
370 Don\[aq]t check dependencies before uninstalling the packages.
371 .TP
372 \f[B]\-\-noscripts\f[R], \f[B]\-\-nopreun\f[R], \f[B]\-\-nopostun\f[R]
373 Don\[aq]t execute the scriptlet of the same name.
374 The \f[B]\-\-noscripts\f[R] option during package erase is equivalent to
375 .PP
376 \f[B]\-\-nopreun\f[R] \f[B]\-\-nopostun\f[R]
377 .PP
378 and turns off the execution of the corresponding \f[B]%preun\f[R], and
379 \f[B]%postun\f[R] scriptlet(s).
380 .TP
381 \f[B]\-\-notriggers\f[R], \f[B]\-\-notriggerun\f[R], \f[B]\-\-notriggerpostun\f[R]
382 Don\[aq]t execute any trigger scriptlet of the named type.
383 The \f[B]\-\-notriggers\f[R] option is equivalent to
384 .PP
385 \f[B]\-\-notriggerun\f[R] \f[B]\-\-notriggerpostun\f[R]
386 .PP
387 and turns off execution of the corresponding \f[B]%triggerun\f[R], and
388 \f[B]%triggerpostun\f[R] scriptlet(s).
389 .TP
390 \f[B]\-\-test\f[R]
391 Don\[aq]t really uninstall anything, just go through the motions.
392 Useful in conjunction with the \f[B]\-vv\f[R] option for debugging.
393 .SS QUERY OPTIONS
394 The general form of an \f[B]rpm\f[R] query command is
395 .PP
396 \f[B]rpm\f[R] {\f[B]\-q|\-\-query\f[R]} [\f[B]select\-options\f[R]]
397 [\f[B]query\-options\f[R]]
398 .PP
399 You may specify the format that package information should be printed
400 in.
401 To do this, you use the
402 .PP
403 \f[B]\-\-qf|\-\-queryformat\f[R] \f[I]QUERYFMT\f[R]
404 .PP
405 option, followed by the \f[I]QUERYFMT\f[R] format string.
406 Query formats are modified versions of the standard \f[B]printf\f[R](3)
407 formatting.
408 The format is made up of static strings (which may include standard C
409 character escapes for newlines, tabs, and other special characters (not
410 including \[rs]0)) and \f[B]printf\f[R](3) type formatters.
411 As \f[B]rpm\f[R] already knows the type to print, the type specifier
412 must be omitted however, and replaced by the name of the header tag to
413 be printed, enclosed by \f[B]{}\f[R] characters.
414 Tag names are case insensitive, and the leading \f[B]RPMTAG_\f[R]
415 portion of the tag name may be omitted as well.
416 .PP
417 Alternate output formats may be requested by following the tag with
418 \f[B]:\f[R]\f[I]typetag\f[R].
419 Currently, the following types are supported:
420 .TP
421 \f[B]:armor\f[R]
422 Wrap a public key in ASCII armor.
423 .TP
424 \f[B]:arraysize\f[R]
425 Display number of elements in array tags.
426 .TP
427 \f[B]:base64\f[R]
428 Encode binary data using base64.
429 .TP
430 \f[B]:date\f[R]
431 Use \f[B]strftime\f[R](3) \[dq]%c\[dq] format.
432 .TP
433 \f[B]:day\f[R]
434 Use \f[B]strftime\f[R](3) \[dq]%a %b %d %Y\[dq] format.
435 .TP
436 \f[B]:depflags\f[R]
437 Format dependency comparison operator.
438 .TP
439 \f[B]:deptype\f[R]
440 Format dependency type.
441 .TP
442 \f[B]:expand\f[R]
443 Perform macro expansion.
444 .TP
445 \f[B]:fflags\f[R]
446 Format file flags.
447 .TP
448 \f[B]:fstate\f[R]
449 Format file state.
450 .TP
451 \f[B]:fstatus\f[R]
452 Format file verify status.
453 .TP
454 \f[B]:hex\f[R]
455 Format in hexadecimal.
456 .TP
457 \f[B]:octal\f[R]
458 Format in octal.
459 .TP
460 \f[B]:humaniec\f[R]
461 Human readable number (in IEC 80000).
462 The suffix K = 1024, M = 1048576, ...
463 .TP
464 \f[B]:humansi\f[R]
465 Human readable number (in SI).
466 The suffix K = 1000, M = 1000000, ...
467 .TP
468 \f[B]:json\f[R]
469 Wrap data in JSON.
470 .TP
471 \f[B]:perms\f[R]
472 Format file permissions.
473 .TP
474 \f[B]:pgpsig\f[R]
475 Display signature fingerprint and time.
476 .TP
477 \f[B]:shescape\f[R]
478 Escape single quotes for use in a script.
479 .TP
480 \f[B]:string\f[R]
481 Display string format.
482 (default)
483 .TP
484 \f[B]:tagname\f[R]
485 Display tag name.
486 .TP
487 \f[B]:tagnum\f[R]
488 Display tag number.
489 .TP
490 \f[B]:triggertype\f[R]
491 Display trigger suffix.
492 .TP
493 \f[B]:vflags\f[R]
494 File verification flags.
495 .TP
496 \f[B]:xml\f[R]
497 Wrap data in simple xml markup.
498 .PP
499 For example, to print only the names of the packages queried, you could
500 use \f[B]%{NAME}\f[R] as the format string.
501 To print the packages name and distribution information in two columns,
502 you could use \f[B]%\-30{NAME}%{DISTRIBUTION}\f[R].
503 \f[B]rpm\f[R] will print a list of all of the tags it knows about when
504 it is invoked with the \f[B]\-\-querytags\f[R] argument.
505 .PP
506 There are three subsets of options for querying: package selection, file
507 selection and information selection.
508 .SS PACKAGE SELECTION OPTIONS
509 .TP
510 \f[I]PACKAGE_NAME\f[R]
511 Query installed package named \f[I]PACKAGE_NAME\f[R].
512 To specify the package more precisely the package name may be followed
513 by the version or version and release both separated by a dash or an
514 architecture name separated by a dot.
515 See the output of \f[B]rpm \-qa\f[R] or \f[B]rpm \-qp\f[R]
516 \f[I]PACKAGE_FILE\f[R] as an example.
517 .TP
518 \f[B]\-a, \-\-all [\f[R]\f[I]SELECTOR\f[R]]
519 Query all installed packages.
520 .PP
521 An optional \f[I]SELECTOR\f[R] in the form of tag=pattern can be
522 provided to narrow the selection, for example name=\[dq]b*\[dq] to query
523 packages whose name starts with \[dq]b\[dq].
524 .TP
525 \f[B]\-\-dupes\f[R]
526 List duplicated packages.
527 .TP
528 \f[B]\-f, \-\-file\f[R] \f[I]FILE\f[R]
529 Query package owning installed \f[I]FILE\f[R].
530 .TP
531 \f[B]\-\-filecaps\f[R]
532 List file names with POSIX1.e capabilities.
533 .TP
534 \f[B]\-\-fileclass\f[R]
535 List file names with their classes (libmagic classification).
536 .TP
537 \f[B]\-\-filecolor\f[R]
538 List file names with their colors (0 for noarch, 1 for 32bit, 2 for 64
539 bit).
540 .TP
541 \f[B]\-\-fileprovide\f[R]
542 List file names with their provides.
543 .TP
544 \f[B]\-\-filerequire\f[R]
545 List file names with their requires.
546 .TP
547 \f[B]\-g, \-\-group\f[R] \f[I]GROUP\f[R]
548 Query packages with the group of \f[I]GROUP\f[R].
549 .TP
550 \f[B]\-\-hdrid\f[R] \f[I]SHA1\f[R]
551 Query package that contains a given header identifier, i.e.\ the
552 \f[I]SHA1\f[R] digest of the immutable header region.
553 .TP
554 \f[B]\-p, \-\-package\f[R] \f[I]PACKAGE_FILE\f[R]
555 Query an (uninstalled) package \f[I]PACKAGE_FILE\f[R].
556 The \f[I]PACKAGE_FILE\f[R] may be specified as an \f[B]ftp\f[R] or
557 \f[B]http\f[R] style URL, in which case the package header will be
558 downloaded and queried.
559 See \f[B]FTP/HTTP OPTIONS\f[R] for information on \f[B]rpm\f[R]\[aq]s
560 \f[B]ftp\f[R] and \f[B]http\f[R] client support.
561 The \f[I]PACKAGE_FILE\f[R] argument(s), if not a binary package, will be
562 interpreted as an ASCII package manifest unless \f[B]\-\-nomanifest\f[R]
563 option is used.
564 In manifests, comments are permitted, starting with a
565 \[aq]\f[I]#\f[R]\[aq], and each line of a package manifest file may
566 include white space separated glob expressions, including URL\[aq]s,
567 that will be expanded to paths that are substituted in place of the
568 package manifest as additional \f[I]PACKAGE_FILE\f[R] arguments to the
569 query.
570 .TP
571 \f[B]\-\-path\f[R] \f[I]PATH\f[R]
572 Query package(s) owning \f[I]PATH\f[R], whether the file is installed or
573 not.
574 Multiple packages may own a \f[I]PATH\f[R], but the file is only owned
575 by the package installed last.
576 .TP
577 \f[B]\-\-pkgid\f[R] \f[I]MD5\f[R]
578 Query package that contains a given package identifier, i.e.\ the
579 \f[I]MD5\f[R] digest of the combined header and payload contents.
580 .TP
581 \f[B]\-\-querybynumber\f[R] \f[I]HDRNUM\f[R]
582 Query the \f[I]HDRNUM\f[R]th database entry directly; this is useful
583 only for debugging.
584 .TP
585 \f[B]\-\-specfile\f[R] \f[I]SPECFILE\f[R]
586 Parse and query \f[I]SPECFILE\f[R] as if it were a package.
587 Although not all the information (e.g.\ file lists) is available, this
588 type of query permits \f[B]rpm\f[R] to be used to extract information
589 from spec files without having to write a specfile parser.
590 .TP
591 \f[B]\-\-tid\f[R] \f[I]TID\f[R]
592 Query package(s) that have a given \f[I]TID\f[R] transaction identifier.
593 A UNIX time stamp is currently used as a transaction identifier.
594 All package(s) installed or erased within a single transaction have a
595 common identifier.
596 .TP
597 \f[B]\-\-triggeredby\f[R] \f[I]PACKAGE_NAME\f[R]
598 Query packages that are triggered by package(s) \f[I]PACKAGE_NAME\f[R].
599 .TP
600 \f[B]\-\-whatobsoletes\f[R] \f[I]CAPABILITY\f[R]
601 Query all packages that obsolete \f[I]CAPABILITY\f[R] for proper
602 functioning.
603 .TP
604 \f[B]\-\-whatprovides\f[R] \f[I]CAPABILITY\f[R]
605 Query all packages that provide the \f[I]CAPABILITY\f[R] capability.
606 .TP
607 \f[B]\-\-whatrequires\f[R] \f[I]CAPABILITY\f[R]
608 Query all packages that require \f[I]CAPABILITY\f[R] for proper
609 functioning.
610 .TP
611 \f[B]\-\-whatconflicts\f[R] \f[I]CAPABILITY\f[R]
612 Query all packages that conflict with \f[I]CAPABILITY\f[R].
613 .TP
614 \f[B]\-\-whatrecommends\f[R] \f[I]CAPABILITY\f[R]
615 Query all packages that recommend \f[I]CAPABILITY\f[R].
616 .TP
617 \f[B]\-\-whatsuggests\f[R] \f[I]CAPABILITY\f[R]
618 Query all packages that suggest \f[I]CAPABILITY\f[R].
619 .TP
620 \f[B]\-\-whatsupplements\f[R] \f[I]CAPABILITY\f[R]
621 Query all packages that supplement \f[I]CAPABILITY\f[R].
622 .TP
623 \f[B]\-\-whatenhances\f[R] \f[I]CAPABILITY\f[R]
624 Query all packages that enhance \f[I]CAPABILITY\f[R].
625 .SS PACKAGE QUERY OPTIONS
626 .TP
627 \f[B]\-\-changelog\f[R]
628 Display change information for the package.
629 .TP
630 \f[B]\-\-changes\f[R]
631 Display change information for the package with full time stamps.
632 .TP
633 \f[B]\-\-conflicts\f[R]
634 List capabilities this package conflicts with.
635 .TP
636 \f[B]\-\-dump\f[R]
637 Dump file information as follows (implies \f[B]\-l\f[R]):
638 .RS
639 .IP
640 .EX
641 path size mtime digest mode owner group isconfig isdoc rdev symlink
642
643 .EE
644 .RE
645 .TP
646 \f[B]\-\-enhances\f[R]
647 List capabilities enhanced by package(s).
648 .TP
649 \f[B]\-\-filesbypkg\f[R]
650 List all the files in each selected package.
651 .TP
652 \f[B]\-\-filetriggers\f[R]
653 List filetrigger scriptlets from package(s).
654 .TP
655 \f[B]\-i, \-\-info\f[R]
656 Display package information, including name, version, and description.
657 This uses the \f[B]\-\-queryformat\f[R] if one was specified.
658 .TP
659 \f[B]\-\-last\f[R]
660 Orders the package listing by install time such that the latest packages
661 are at the top.
662 .TP
663 \f[B]\-l, \-\-list\f[R]
664 List files in package.
665 .TP
666 \f[B]\-\-obsoletes\f[R]
667 List packages this package obsoletes.
668 .TP
669 \f[B]\-\-provides\f[R]
670 List capabilities this package provides.
671 .TP
672 \f[B]\-\-recommends\f[R]
673 List capabilities recommended by package(s).
674 .TP
675 \f[B]\-R, \-\-requires\f[R]
676 List capabilities on which this package depends.
677 .TP
678 \f[B]\-\-suggests\f[R]
679 List capabilities suggested by package(s).
680 .TP
681 \f[B]\-\-supplements\f[R]
682 List capabilities supplemented by package(s).
683 .TP
684 \f[B]\-\-scripts\f[R]
685 List the package specific scriptlet(s) that are used as part of the
686 installation and uninstallation processes.
687 .TP
688 \f[B]\-s, \-\-state\f[R]
689 Display the \f[I]states\f[R] of files in the package (implies
690 \f[B]\-l\f[R]).
691 The state of each file is one of \f[I]normal\f[R], \f[I]not
692 installed\f[R], or \f[I]replaced\f[R].
693 .TP
694 \f[B]\-\-triggers, \-\-triggerscripts\f[R]
695 Display the trigger scripts, if any, which are contained in the package.
696 .TP
697 \f[B]\-\-xml\f[R]
698 Format package headers as XML.
699 .SS FILE SELECTION OPTIONS
700 .TP
701 \f[B]\-A, \-\-artifactfiles\f[R]
702 Only include artifact files (implies \f[B]\-l\f[R]).
703 .TP
704 \f[B]\-c, \-\-configfiles\f[R]
705 Only include configuration files (implies \f[B]\-l\f[R]).
706 .TP
707 \f[B]\-d, \-\-docfiles\f[R]
708 Only include documentation files (implies \f[B]\-l\f[R]).
709 .TP
710 \f[B]\-L, \-\-licensefiles\f[R]
711 Only include license files (implies \f[B]\-l\f[R]).
712 .TP
713 \f[B]\-\-noartifact\f[R]
714 Exclude artifact files.
715 .TP
716 \f[B]\-\-noconfig\f[R]
717 Exclude config files.
718 .TP
719 \f[B]\-\-noghost\f[R]
720 Exclude ghost files.
721 .SS VERIFY OPTIONS
722 The general form of an \f[B]rpm\f[R] verify command is
723 .PP
724 \f[B]rpm\f[R] {\f[B]\-V|\-\-verify\f[R]} [\f[B]select\-options\f[R]]
725 [\f[B]verify\-options\f[R]]
726 .PP
727 Verifying a package compares information about the installed files in
728 the package with information about the files taken from the package
729 metadata stored in the rpm database.
730 Among other things, verifying compares the size, digest, permissions,
731 type, owner and group of each file.
732 Any discrepancies are displayed.
733 Files that were not installed from the package, for example,
734 documentation files excluded on installation using the
735 \[dq]\f[B]\-\-excludedocs\f[R]\[dq] option, will be silently ignored.
736 .PP
737 The package and file selection options are the same as for package
738 querying (including package manifest files as arguments).
739 Other options unique to verify mode are:
740 .TP
741 \f[B]\-\-nodeps\f[R]
742 Don\[aq]t verify dependencies of packages.
743 .TP
744 \f[B]\-\-nodigest\f[R]
745 Don\[aq]t verify package or header digests when reading.
746 .TP
747 \f[B]\-\-nofiles\f[R]
748 Don\[aq]t verify any attributes of package files.
749 .TP
750 \f[B]\-\-noscripts\f[R]
751 Don\[aq]t execute the \f[B]%verifyscript\f[R] scriptlet (if any).
752 .TP
753 \f[B]\-\-nosignature\f[R]
754 Don\[aq]t verify package or header signatures when reading.
755 .TP
756 \f[B]\-\-nolinkto\f[R]
757 .TP
758 \f[B]\-\-nofiledigest\f[R] (formerly \f[B]\-\-nomd5\f[R])
759 .TP
760 \f[B]\-\-nosize\f[R]
761 .TP
762 \f[B]\-\-nomtime\f[R]
763 .TP
764 \f[B]\-\-nomode\f[R]
765 .TP
766 \f[B]\-\-nordev\f[R]
767 Don\[aq]t verify the corresponding file attribute.
768 .TP
769 \f[B]\-\-nouser\f[R]
770 .TP
771 \f[B]\-\-nogroup\f[R]
772 Don\[aq]t verify file user/group ownership.
773 Note that only local \f[B]passwd\f[R](5) and \f[B]group\f[R](5)
774 databases are consulted.
775 .TP
776 \f[B]\-\-nocaps\f[R]
777 Don\[aq]t verify file capabilities.
778 .PP
779 The format of the output is a string of 9 characters, a possible
780 attribute marker:
781 .IP
782 .EX
783 **a** %**a**rtifact a build side\-effect file (such as buildid links).
784 **c** %**c**onfig configuration file.
785 **d** %**d**oc documentation file.
786 **g** %**g**host file (i.e. the file contents are not included in the package payload).
787 **l** %**l**icense license file.
788 **m** %**m**issingok file missing is not a verify failure.
789 **n** %%config(**n**oreplace) (do not replace file).
790 **r** %**r**eadme readme file.
791 **s** **s**pecfile in source package.
792 .EE
793 .PP
794 from the package header, followed by the file name.
795 Each of the 9 characters denotes the result of a comparison of
796 attribute(s) of the file to the value of those attribute(s) recorded in
797 the database.
798 A single \[dq]\f[B].\f[R]\[dq] (period) means the test passed, while a
799 single \[dq]\f[B]?\f[R]\[dq] (question mark) indicates the test could
800 not be performed (e.g.\ file permissions prevent reading).
801 Otherwise, the (mnemonically em\f[B]B\f[R]oldened) character denotes
802 failure of the corresponding \f[B]\-\-verify\f[R] test:
803 .IP
804 .EX
805 **S** file **S**ize differs
806 **M** **M**ode differs (includes permissions and file type)
807 **5** digest (formerly MD**5** sum) differs
808 **D** **D**evice major/minor number mismatch
809 **L** read**L**ink(2) path mismatch
810 **U** **U**ser ownership differs
811 **G** **G**roup ownership differs
812 **T** m**T**ime differs
813 **P** ca**P**abilities differ
814 .EE
815 .SS MISCELLANEOUS COMMANDS
816 .TP
817 \f[B]rpm\f[R] \f[B]\-\-showrc\f[R]
818 shows the values \f[B]rpm\f[R] will use for all of the options which are
819 currently set in \f[I]rpmrc\f[R] and \f[I]macros\f[R] configuration
820 file(s).
821 .TP
822 \f[B]rpm\f[R] \f[B]\-\-setperms\f[R] | \f[B]\-\-setugids\f[R] | \f[B]\-\-setcaps\f[R] \f[I]PACKAGE_NAME\f[R]
823 obsolete aliases for \f[B]\-\-restore\f[R]
824 .TP
825 \f[B]rpm\f[R] \f[B]\-\-restore\f[R] [\f[B]select\-options\f[R]]
826 The option restores file metadata such as timestamp, owner, group,
827 permissions and capabilities of files in packages.
828 .SS FTP/HTTP OPTIONS
829 \f[B]rpm\f[R] can act as an FTP and/or HTTP client so that packages can
830 be queried or installed from the internet.
831 Package files for install, upgrade, and query operations may be
832 specified as an \f[B]ftp\f[R] or \f[B]http\f[R] style URL:
833 .PP
834 http://HOST[:PORT]/path/to/package.rpm
835 .PP
836 ftp://[USER:PASSWORD]\[at]HOST[:PORT]/path/to/package.rpm
837 .PP
838 If both the user and password are omitted, anonymous \f[B]ftp\f[R] is
839 used.
840 .PP
841 \f[B]rpm\f[R] allows the following options to be used with ftp URLs:
842 .PP
843 \f[B]rpm\f[R] allows the following options to be used with
844 \f[B]http\f[R] and \f[B]ftp\f[R] URLs:
845 .TP
846 \f[B]\-\-httpproxy\f[R] \f[I]HOST\f[R]
847 The host \f[I]HOST\f[R] will be used as a proxy server for all
848 \f[B]http\f[R] and \f[B]ftp\f[R] transfers.
849 This option may also be specified by configuring the macro
850 \f[B]%_httpproxy\f[R].
851 .TP
852 \f[B]\-\-httpport\f[R] \f[I]PORT\f[R]
853 The TCP \f[I]PORT\f[R] number to use for the \f[B]http\f[R] connection
854 on the proxy http server instead of the default port.
855 This option may also be specified by configuring the macro
856 \f[B]%_httpport\f[R].
857 .SH LEGACY ISSUES
858 .SS Executing rpmbuild
859 The build modes of rpm are now resident in the
860 \f[I]/usr/bin/rpmbuild\f[R] executable.
861 Install the package containing \f[B]rpmbuild\f[R] (usually
862 \f[B]rpm\-build\f[R]) and see \f[B]rpmbuild\f[R](8) for documentation of
863 all the \f[B]rpm\f[R] build modes.
864 .SH FILES
865 .SS rpmrc Configuration
866 Each file in the colon separated rpmrc path is read sequentially by
867 \f[B]rpm\f[R] for configuration information.
868 Only the first file in the list must exist, and tildes will be expanded
869 to the value of \f[B]$HOME\f[R].
870 The default rpmrc path is as follows:
871 .IP
872 .EX
873 /usr/lib/rpm/rpmrc:
874 /usr/lib/rpm/<vendor>/rpmrc:
875 /etc/rpmrc:
876 \[ti]/.config/rpm/rpmrc
877 .EE
878 .PP
879 If \f[B]XDG_CONFIG_HOME\f[R] environment variable is set, it replaces
880 \[ti]/.config in the path.
881 .PP
882 In older rpm versions the path of per\-user rpmrc was \[ti]/.rpmrc.
883 This is still processed if it exists and the new configuration directory
884 does not exist.
885 .SS Macro Configuration
886 Each file or \f[B]glob\f[R](7) pattern in the colon\-separated macro
887 path is read sequentially by \f[B]rpm\f[R] for macro definitions.
888 Tildes will be expanded to the value of the environment variable
889 \f[I]HOME\f[R].
890 The default macro path is as follows:
891 .IP
892 .EX
893 /usr/lib/rpm/macros:
894 /usr/lib/rpm/macros.d/macros.*:
895 /usr/lib/rpm/platform/%{_target}/macros:
896 /usr/lib/rpm/fileattrs/*.attr:
897 /usr/lib/rpm/<vendor>/macros:
898 /etc/rpm/macros.*:
899 /etc/rpm/macros:
900 /etc/rpm/%{_target}/macros:
901 \[ti]/.config/rpm/macros
902 .EE
903 .PP
904 If \f[B]XDG_CONFIG_HOME\f[R] environment variable is set, it replaces
905 \[ti]/.config in the path.
906 .PP
907 In older versions of rpm, the path of per\-user macros was
908 \[ti]/.rpmmacros.
909 This is still processed if it exists and the new configuration directory
910 does not exist.
911 .SS Database
912 .IP
913 .EX
914 /var/lib/rpm/
915 .EE
916 .SS Temporary
917 .IP
918 .EX
919 /var/tmp/rpm*
920 .EE
921 .SH SEE ALSO
922 \f[B]rpm\-misc\f[R](8), \f[B]popt\f[R](3), \f[B]rpm2cpio\f[R](8),
923 \f[B]rpmbuild\f[R](8), \f[B]rpmdb\f[R](8), \f[B]rpmkeys\f[R](8),
924 \f[B]rpmsign\f[R](8), \f[B]rpmspec\f[R](8)
925 .PP
926 \f[B]rpm \-\-help\f[R] \- as \f[B]rpm\f[R] supports customizing the
927 options via popt aliases it\[aq]s impossible to guarantee that
928 what\[aq]s described in the manual matches what\[aq]s available.
929 .PP
930 \f[B]http://www.rpm.org/ <URL:http://www.rpm.org/>\f[R]
931 .SH AUTHORS
932 .IP
933 .EX
934 Marc Ewing <marc\[at]redhat.com>
935 Jeff Johnson <jbj\[at]redhat.com>
936 Erik Troan <ewt\[at]redhat.com>
937 .EE