1 .\" This manpage has been automatically generated by docbook2man
2 .\" from a DocBook document. This tool can be found at:
3 .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
4 .\" Please send any bug reports, improvements, comments, patches,
5 .\" etc. to Steve Cheng <steve@ggi-project.org>.
6 .TH "RPM" "8" "09 June 2002" "Red Hat, Inc."
8 rpm \- RPM Package Manager
10 .SS "QUERYING AND VERIFYING PACKAGES:"
14 \fBrpm\fR {\fB-q|--query\fR} [\fBselect-options\fR] [\fBquery-options\fR]
18 \fBrpm\fR {\fB-V|--verify\fR} [\fBselect-options\fR] [\fBverify-options\fR]
22 \fBrpm\fR [\fB--nosignature\fR] [\fB--nodigest\fR]
23 \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
25 .SS "INSTALLING, UPGRADING, AND REMOVING PACKAGES:"
29 \fBrpm\fR {\fB-i|--install\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
33 \fBrpm\fR {\fB-U|--upgrade\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
37 \fBrpm\fR {\fB-F|--freshen\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
41 \fBrpm\fR {\fB-e|--erase\fR} [\fB--allmatches\fR] [\fB--nodeps\fR] [\fB--noscripts\fR]
42 [\fB--notriggers\fR] [\fB--test\fR] \fB\fIPACKAGE_NAME\fB\fR\fI\ ...\fR
48 \fBrpm\fR {\fB--querytags|--showrc\fR}
52 \fBrpm\fR {\fB--setperms|--setugids\fR} \fB\fIPACKAGE_NAME\fB\fR\fI ...\fR
58 [\fB\fIPACKAGE_NAME\fB\fR] [\fB-a,--all\fR] [\fB-f,--file \fIFILE\fB\fR]
59 [\fB-g,--group \fIGROUP\fB\fR] {\fB-p,--package \fIPACKAGE_FILE\fB\fR]
60 [\fB--hdrid \fISHA1\fB\fR] [\fB--pkgid \fIMD5\fB\fR] [\fB--tid \fITID\fB\fR]
61 [\fB--querybynumber \fIHDRNUM\fB\fR] [\fB--triggeredby \fIPACKAGE_NAME\fB\fR]
62 [\fB--whatprovides \fICAPABILITY\fB\fR] [\fB--whatrequires \fICAPABILITY\fB\fR]
68 [\fB--changelog\fR] [\fB-c,--configfiles\fR] [\fB--conflicts\fR]
69 [\fB-d,--docfiles\fR] [\fB--dump\fR] [\fB--filesbypkg\fR] [\fB-i,--info\fR]
70 [\fB--last\fR] [\fB-l,--list\fR] [\fB--obsoletes\fR] [\fB--provides\fR]
71 [\fB--qf,--queryformat \fIQUERYFMT\fB\fR] [\fB-R,--requires\fR]
72 [\fB--scripts\fR] [\fB-s,--state\fR] [\fB--triggers,--triggerscripts\fR]
78 [\fB--nodeps\fR] [\fB--nofiles\fR] [\fB--noscripts\fR]
79 [\fB--nodigest\fR] [\fB--nosignature\fR]
80 [\fB--nolinkto\fR] [\fB--nofiledigest\fR] [\fB--nosize\fR] [\fB--nouser\fR]
81 [\fB--nogroup\fR] [\fB--nomtime\fR] [\fB--nomode\fR] [\fB--nordev\fR]
88 [\fB--allfiles\fR] [\fB--badreloc\fR] [\fB--excludepath \fIOLDPATH\fB\fR]
89 [\fB--excludedocs\fR] [\fB--force\fR] [\fB-h,--hash\fR]
90 [\fB--ignoresize\fR] [\fB--ignorearch\fR] [\fB--ignoreos\fR]
91 [\fB--includedocs\fR] [\fB--justdb\fR] [\fB--nocollections\fR]
92 [\fB--nodeps\fR] [\fB--nodigest\fR] [\fB--nosignature\fR]
93 [\fB--noorder\fR] [\fB--noscripts\fR] [\fB--notriggers\fR]
94 [\fB--oldpackage\fR] [\fB--percent\fR] [\fB--prefix \fINEWPATH\fB\fR]
95 [\fB--relocate \fIOLDPATH\fB=\fINEWPATH\fB\fR]
96 [\fB--replacefiles\fR] [\fB--replacepkgs\fR]
101 \fBrpm\fR is a powerful \fBPackage Manager\fR,
102 which can be used to build, install, query, verify, update, and
103 erase individual software packages.
104 A \fBpackage\fR consists of an archive of files and
105 meta-data used to install and erase the archive files. The meta-data
106 includes helper scripts, file attributes, and descriptive information
108 \fBPackages\fR come in two varieties: binary packages,
109 used to encapsulate software to be installed, and source packages,
110 containing the source code and recipe necessary to produce binary
113 One of the following basic modes must be selected:
116 \fBInstall/Upgrade/Freshen\fR,
118 \fBSet Owners/Groups\fR,
119 \fBShow Querytags\fR, and
120 \fBShow Configuration\fR.
121 .SS "GENERAL OPTIONS"
123 These options can be used in all the different modes.
126 Print a longer usage message then normal.
129 Print a single line containing the version number of \fBrpm\fR
133 Print as little as possible - normally only error messages will
137 Print verbose information - normally routine progress messages will be
141 Print lots of ugly debugging information.
143 \fB--rcfile \fIFILELIST\fB\fR
144 Each of the files in the colon separated
146 is read sequentially by \fBrpm\fR for configuration
148 Only the first file in the list must exist, and tildes will be
149 expanded to the value of \fB$HOME\fR.
150 The default \fIFILELIST\fR is
151 \fI/usr/lib/rpm/rpmrc\fR:\fI/usr/lib/rpm/redhat/rpmrc\fR:\fI/etc/rpmrc\fR:\fI~/.rpmrc\fR.
153 \fB--pipe \fICMD\fB\fR
154 Pipes the output of \fBrpm\fR to the command \fICMD\fR.
156 \fB--dbpath \fIDIRECTORY\fB\fR
157 Use the database in \fIDIRECTORY\fR rather
158 than the default path \fI/var/lib/rpm\fR
160 \fB--root \fIDIRECTORY\fB\fR
161 Use the file system tree rooted at \fIDIRECTORY\fR for all operations.
162 Note that this means the database within
164 will be used for dependency checks and any scriptlet(s) (e.g.
165 \fB%post\fR if installing, or
166 \fB%prep\fR if building, a package)
167 will be run after a chroot(2) to
170 \fB-D, --define='\fIMACRO EXPR\fB'\fR
171 Defines \fIMACRO\fR with value \fIEXPR\fR.
173 \fB--undefine='\fIMACRO\fB'\fR
174 Undefines \fIMACRO\fR.
176 \fB-E, --eval='\fIEXPR\fB'\fR
177 Prints macro expansion of \fIEXPR\fR.
178 .SS "INSTALL AND UPGRADE OPTIONS"
180 In these options, \fIPACKAGE_FILE\fR can be either \fBrpm\fR binary
181 file or ASCII package manifest (see \fBPACKAGE SELECTION OPTIONS\fR), and
182 may be specified as an
185 in which case the package will be downloaded before being
186 installed. See \fBFTP/HTTP OPTIONS\fR
187 for information on \fBrpm\fR's internal
192 The general form of an rpm install command is
194 \fBrpm\fR {\fB-i|--install\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
196 This installs a new package.
198 The general form of an rpm upgrade command is
200 \fBrpm\fR {\fB-U|--upgrade\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
202 This upgrades or installs the package currently installed
203 to a newer version. This is the same as install, except
204 all other version(s) of the package are removed after the
205 new package is installed.
207 \fBrpm\fR {\fB-F|--freshen\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
209 This will upgrade packages, but only ones for which an earlier version is
214 Installs or upgrades all the missingok files in the package,
215 regardless if they exist.
218 Used with \fB--relocate\fR, permit relocations on
219 all file paths, not just those \fIOLDPATH\fR's
220 included in the binary package relocation hint(s).
222 \fB--excludepath \fIOLDPATH\fB\fR
223 Don't install files whose name begins with
227 Don't install any files which are marked as documentation
228 (which includes man pages and texinfo documents).
233 \fB--replacefiles\fR, and
237 Print 50 hash marks as the package archive is unpacked.
238 Use with \fB-v|--verbose\fR for a nicer display.
241 Don't check mount file systems for sufficient disk space before
242 installing this package.
245 Allow installation or upgrading even if the architectures
246 of the binary package and host don't match.
249 Allow installation or upgrading even if the operating
250 systems of the binary package and host don't match.
253 Install documentation files. This is the default behavior.
256 Update only the database, not the filesystem.
259 Don't verify package or header digests when reading.
262 Don't process non-package files as manifests.
265 Don't verify package or header signatures when reading.
268 Don't do a dependency check before installing or upgrading
272 Don't reorder the packages for an install. The list of
273 packages would normally be reordered to satisfy dependencies.
288 Don't execute the scriptlet of the same name.
289 The \fB--noscripts\fR option is equivalent to
298 and turns off the execution of the corresponding
313 \fB--notriggerprein\fR
315 \fB--notriggerpostun\fR
316 Don't execute any trigger scriptlet of the named type.
317 The \fB--notriggers\fR option is equivalent to
319 \fB--notriggerprein\fR
322 \fB--notriggerpostun\fR
324 and turns off execution of the corresponding
327 \fB%triggerun\fR, and
332 Allow an upgrade to replace a newer package with an older one.
335 Print percentages as files are unpacked from the package archive.
336 This is intended to make \fBrpm\fR easy to run from
339 \fB--prefix \fINEWPATH\fB\fR
340 For relocatable binary packages, translate all file paths that
341 start with the installation prefix in the package relocation hint(s)
344 \fB--relocate \fIOLDPATH\fB=\fINEWPATH\fB\fR
345 For relocatable binary packages, translate all file paths
346 that start with \fIOLDPATH\fR in the
347 package relocation hint(s) to \fINEWPATH\fR.
348 This option can be used repeatedly if several
349 \fIOLDPATH\fR's in the package are to
353 Install the packages even if they replace files from other,
354 already installed, packages.
357 Install the packages even if some of them are already installed
361 Do not install the package, simply check for and report
365 The general form of an rpm erase command is
368 \fBrpm\fR {\fB-e|--erase\fR} [\fB--allmatches\fR] [\fB--nodeps\fR] [\fB--noscripts\fR] [\fB--notriggers\fR] [\fB--test\fR] \fB\fIPACKAGE_NAME\fB\fR\fI ...\fR
371 The following options may also be used:
374 Remove all versions of the package which match
375 \fIPACKAGE_NAME\fR. Normally an
376 error is issued if \fIPACKAGE_NAME\fR
377 matches multiple packages.
380 Don't check dependencies before uninstalling the packages.
387 Don't execute the scriptlet of the same name.
388 The \fB--noscripts\fR option during package erase is
394 and turns off the execution of the corresponding
403 \fB--notriggerpostun\fR
404 Don't execute any trigger scriptlet of the named type.
405 The \fB--notriggers\fR option is equivalent to
408 \fB--notriggerpostun\fR
410 and turns off execution of the corresponding
411 \fB%triggerun\fR, and
416 Don't really uninstall anything, just go through the motions.
417 Useful in conjunction with the \fB-vv\fR option
421 The general form of an rpm query command is
424 \fBrpm\fR {\fB-q|--query\fR} [\fBselect-options\fR] [\fBquery-options\fR]
427 You may specify the format that package information should be
428 printed in. To do this, you use the
430 \fB--qf|--queryformat\fR \fB\fIQUERYFMT\fB\fR
432 option, followed by the \fIQUERYFMT\fR
433 format string. Query formats are modified versions of the
434 standard \fBprintf(3)\fR formatting. The format
435 is made up of static strings (which may include standard C
436 character escapes for newlines, tabs, and other special
437 characters) and \fBprintf(3)\fR type formatters.
438 As \fBrpm\fR already knows the type to print, the
439 type specifier must be omitted however, and replaced by the name
440 of the header tag to be printed, enclosed by \fB{}\fR
441 characters. Tag names are case insensitive, and the leading
442 \fBRPMTAG_\fR portion of the tag name may be omitted
445 Alternate output formats may be requested by following
446 the tag with \fB:\fItypetag\fB\fR.
447 Currently, the following types are supported:
450 Wrap a public key in ASCII armor.
453 Display number of elements in array tags.
456 Encode binary data using base64.
459 Use strftime(3) "%c" format.
462 Use strftime(3) "%a %b %d %Y" format.
465 Format dependency comparison operator.
468 Format dependency type.
471 Perform macro expansion.
480 Format file verify status.
483 Format in hexadecimal.
489 Format file permissions.
492 Display signature fingerprint and time.
495 Escape single quotes for use in a script.
498 Display trigger suffix.
501 File verification flags.
504 Wrap data in simple xml markup.
506 For example, to print only the names of the packages queried,
507 you could use \fB%{NAME}\fR as the format string.
508 To print the packages name and distribution information in
509 two columns, you could use \fB%-30{NAME}%{DISTRIBUTION}\fR.
510 \fBrpm\fR will print a list of all of the tags it knows about when it
511 is invoked with the \fB--querytags\fR argument.
513 There are two subsets of options for querying: package selection,
514 and information selection.
515 .SS "PACKAGE SELECTION OPTIONS:"
518 \fB\fIPACKAGE_NAME\fB\fR
519 Query installed package named \fIPACKAGE_NAME\fR.
522 Query all installed packages.
524 \fB-f, --file \fIFILE\fB\fR
525 Query package owning \fIFILE\fR.
527 \fB-g, --group \fIGROUP\fB\fR
528 Query packages with the group of \fIGROUP\fR.
530 \fB--hdrid \fISHA1\fB\fR
531 Query package that contains a given header identifier, i.e. the
532 \fISHA1\fR digest of the immutable header region.
534 \fB-p, --package \fIPACKAGE_FILE\fB\fR
535 Query an (uninstalled) package \fIPACKAGE_FILE\fR.
536 The \fIPACKAGE_FILE\fR may be specified
537 as an \fBftp\fR or \fBhttp\fR style URL, in
538 which case the package header will be downloaded and queried.
539 See \fBFTP/HTTP OPTIONS\fR for information on
543 client support. The \fIPACKAGE_FILE\fR argument(s),
544 if not a binary package, will be interpreted as an ASCII package
545 manifest unless \fB--nomanifest\fR option is used.
546 In manifests, comments are permitted, starting with a '#', and each
547 line of a package manifest file may include white space separated
548 glob expressions, including URL's,
549 that will be expanded to paths that are substituted in place of
550 the package manifest as additional \fIPACKAGE_FILE\fR
551 arguments to the query.
553 \fB--pkgid \fIMD5\fB\fR
554 Query package that contains a given package identifier, i.e. the
555 \fIMD5\fR digest of the combined header and
558 \fB--querybynumber \fIHDRNUM\fB\fR
559 Query the \fIHDRNUM\fRth database entry
560 directly; this is useful only for debugging.
562 \fB--specfile \fISPECFILE\fB\fR
563 Parse and query \fISPECFILE\fR as if
564 it were a package. Although not all the information (e.g. file lists)
565 is available, this type of query permits rpm to be used to extract
566 information from spec files without having to write a specfile
569 \fB--tid \fITID\fB\fR
570 Query package(s) that have a given \fITID\fR
571 transaction identifier. A unix time stamp is currently used as a
572 transaction identifier. All package(s) installed or erased within
573 a single transaction have a common identifier.
575 \fB--triggeredby \fIPACKAGE_NAME\fB\fR
576 Query packages that are triggered by package(s)
579 \fB--whatprovides \fICAPABILITY\fB\fR
580 Query all packages that provide the \fICAPABILITY\fR capability.
582 \fB--whatrequires \fICAPABILITY\fB\fR
583 Query all packages that require \fICAPABILITY\fR for proper functioning.
584 .SS "PACKAGE QUERY OPTIONS:"
588 Display change information for the package.
590 \fB-c, --configfiles\fR
591 List only configuration files (implies \fB-l\fR).
594 List capabilities this package conflicts with.
597 List only documentation files (implies \fB-l\fR).
600 Dump file information as follows (implies \fB-l\fR):
605 path size mtime digest mode owner group isconfig isdoc rdev symlink
611 List all the files in each selected package.
614 Display package information, including name, version, and description.
615 This uses the \fB--queryformat\fR if one was specified.
618 Orders the package listing by install time such that the latest
619 packages are at the top.
621 \fB-L, --licensefiles\fR
622 List only license files (implies \fB-l\fR).
625 List files in package.
628 List packages this package obsoletes.
631 List capabilities this package provides.
634 List capabilities on which this package depends.
637 List the package specific scriptlet(s) that are used as part
638 of the installation and uninstallation processes.
641 Display the \fIstates\fR of files in the package
642 (implies \fB-l\fR). The state of each file is one of
644 \fInot installed\fR, or
647 \fB--triggers, --triggerscripts\fR
648 Display the trigger scripts, if any, which are contained in
652 The general form of an rpm verify command is
655 \fBrpm\fR {\fB-V|--verify\fR} [\fBselect-options\fR] [\fBverify-options\fR]
658 Verifying a package compares information about the installed files in
659 the package with information about the files taken from the package
660 metadata stored in the rpm database. Among other things, verifying
661 compares the size, digest, permissions, type, owner and group of
662 each file. Any discrepancies are displayed.
663 Files that were not installed from the package, for example,
664 documentation files excluded on installation using the
665 "\fB--excludedocs\fR" option,
666 will be silently ignored.
668 The package selection options are the same as for package
669 querying (including package manifest files as arguments).
670 Other options unique to verify mode are:
673 Don't verify dependencies of packages.
676 Don't verify package or header digests when reading.
679 Don't verify any attributes of package files.
682 Don't execute the \fB%verifyscript\fR scriptlet (if any).
685 Don't verify package or header signatures when reading.
689 \fB--nofiledigest\fR (formerly \fB--nomd5\fR)
702 Don't verify the corresponding file attribute.
704 The format of the output is a string of 9 characters, a possible
708 \fBc\fR \fB%config\fR configuration file.
709 \fBd\fR \fB%doc\fR documentation file.
710 \fBg\fR \fB%ghost\fR file (i.e. the file contents are not included in the package payload).
711 \fBl\fR \fB%license\fR license file.
712 \fBr\fR \fB%readme\fR readme file.
715 from the package header, followed by the file name.
716 Each of the 9 characters denotes the result of a comparison of
717 attribute(s) of the file to the value of those attribute(s) recorded
718 in the database. A single
720 means the test passed, while a single
721 "\fB?\fR" (question mark)
722 indicates the test could not be performed (e.g. file permissions
723 prevent reading). Otherwise, the (mnemonically
724 em\fBB\fRoldened) character denotes failure of
725 the corresponding \fB--verify\fR test:
728 \fBS\fR file \fBS\fRize differs
729 \fBM\fR \fBM\fRode differs (includes permissions and file type)
730 \fB5\fR digest (formerly MD\fB5\fR sum) differs
731 \fBD\fR \fBD\fRevice major/minor number mismatch
732 \fBL\fR read\fBL\fRink(2) path mismatch
733 \fBU\fR \fBU\fRser ownership differs
734 \fBG\fR \fBG\fRroup ownership differs
735 \fBT\fR m\fBT\fRime differs
736 \fBP\fR ca\fBP\fRabilities differ
739 .SS "MISCELLANEOUS COMMANDS"
742 \fBrpm\fR \fB--showrc\fR
743 shows the values \fBrpm\fR will use for all of the
744 options are currently set in
747 configuration file(s).
749 \fBrpm\fR \fB--setperms\fR \fIPACKAGE_NAME\fR
750 sets permissions of files in the given package.
752 \fBrpm\fR \fB--setugids\fR \fIPACKAGE_NAME\fR
753 sets user/group ownership of files in the given package.
755 .SS "FTP/HTTP OPTIONS"
757 \fBrpm\fR can act as an FTP and/or HTTP client so
758 that packages can be queried or installed from the internet.
759 Package files for install, upgrade, and query operations may be
765 ftp://USER:PASSWORD@HOST:PORT/path/to/package.rpm
767 If the \fB:PASSWORD\fR portion is omitted, the password will be
768 prompted for (once per user/hostname pair). If both the user and
769 password are omitted, anonymous \fBftp\fR is used.
770 In all cases, passive (PASV) \fBftp\fR transfers are
773 \fBrpm\fR allows the following options to be used with
776 \fB--ftpproxy \fIHOST\fB\fR
777 The host \fIHOST\fR will be used as a proxy server
778 for all ftp transfers, which allows users to ftp through firewall
779 machines which use proxy systems. This option may also be specified
780 by configuring the macro \fB%_ftpproxy\fR.
782 \fB--ftpport \fIPORT\fB\fR
783 The TCP \fIPORT\fR number to use for
784 the ftp connection on the proxy ftp server instead of the default
785 port. This option may also be specified by configuring the macro
788 \fBrpm\fR allows the following options to be used with
791 \fB--httpproxy \fIHOST\fB\fR
792 The host \fIHOST\fR will be used as
793 a proxy server for all \fBhttp\fR transfers. This
794 option may also be specified by configuring the macro
797 \fB--httpport \fIPORT\fB\fR
798 The TCP \fIPORT\fR number to use for the
799 \fBhttp\fR connection on the proxy http server instead
800 of the default port. This option may also be specified by configuring
801 the macro \fB%_httpport\fR.
803 .SS "Executing rpmbuild"
805 The build modes of rpm are now resident in the \fI/usr/bin/rpmbuild\fR
807 Install the package containing \fBrpmbuild\fR (usually \fBrpm-build\fR) and see
808 \fBrpmbuild\fR(8) for documentation of all the \fBrpm\fR build modes.
810 .SS "rpmrc Configuration"
813 \fI/usr/lib/rpm/rpmrc\fR
814 \fI/usr/lib/rpm/redhat/rpmrc\fR
818 .SS "Macro Configuration"
821 \fI/usr/lib/rpm/macros\fR
822 \fI/usr/lib/rpm/redhat/macros\fR
823 \fI/etc/rpm/macros\fR
829 \fI/var/lib/rpm/Basenames\fR
830 \fI/var/lib/rpm/Conflictname\fR
831 \fI/var/lib/rpm/Dirnames\fR
832 \fI/var/lib/rpm/Group\fR
833 \fI/var/lib/rpm/Installtid\fR
834 \fI/var/lib/rpm/Name\fR
835 \fI/var/lib/rpm/Obsoletename\fR
836 \fI/var/lib/rpm/Packages\fR
837 \fI/var/lib/rpm/Providename\fR
838 \fI/var/lib/rpm/Requirename\fR
839 \fI/var/lib/rpm/Sha1header\fR
840 \fI/var/lib/rpm/Sigmd5\fR
841 \fI/var/lib/rpm/Triggername\fR
858 \fBrpm --help\fR - as rpm supports customizing the options via popt aliases
859 it's impossible to guarantee that what's described in the manual matches
863 \fBhttp://www.rpm.org/ <URL:http://www.rpm.org/>
868 Marc Ewing <marc@redhat.com>
869 Jeff Johnson <jbj@redhat.com>
870 Erik Troan <ewt@redhat.com>