1 .\" rpm - Red Hat Package Manager
2 .TH rpm 8 "15 July 1996" "Red Hat Software" "Red Hat Linux"
4 rpm \- Red Hat Package Manager
8 \fBrpm\fP is a powerful \fIpackage manager\fP, which can be used to
9 build, install, query, verify, update, and uninstall individual
10 software packages. A \fIpackage\fP consists of an archive of files,
11 and package information, including name, version, and description.
13 There are ten basic modes of operation, and each takes a different
14 set of options. They are \fIInstall\fP, \fIQuery\fP,
15 \fIVerify\fP, \fISignature check\fP, \fIUninstall\fP, \fIBuild\fP,
16 \fIRebuild Database\fP, \fIfix permissions\fP, \fIset owners and groups\fR,
21 .I "\fB rpm \-i [install\-options] <package_file>+\fP"
25 .I "\fB rpm \-q [query\-options]\fP"
29 .I "\fB rpm \-V|\-y|\-\-verify [verify\-options]\fP"
33 .I "\fB rpm \-\-checksig <package_file>+\fP"
37 .I "\fB rpm \-e <package_name>+\fP"
41 .I "\fB rpm \-[b|t]\fIO\fB [build\-options] <package_spec>+\fP"
45 .I "\fB rpm \-\-rebuilddb"
49 .I "\fB rpm \-\-setperms [query\-package\-specifiers]\fP"
51 Set owners and groups:
53 .I "\fB rpm \-\-setugids [query\-package\-specifiers]\fP"
57 .I "\fB rpm \-\-showrc"
61 These options can be used in all the different modes.
63 Print lots of ugly debugging information.
64 .IP "\fB\-\-keep\-temps\fP"
65 Do not remove temporary files (/tmp/rpm\-*). Primarily only useful
68 Print as little as possible \- normally only error messages will be
71 Print a longer usage message then normal.
72 .IP "\fB\-\-version\fP"
73 Print a single line containing the version number of rpm being used.
74 .IP "\fB\-\-rcfile <file>\fP"
75 Use \fB<file>\fP instead of \fB/etc/rpmrc\fP and \fB$HOME/.rpmrc\fP.
76 .IP "\fB\-\-root <dir>\fP"
77 Use the directory given as top level directory for all operations.
80 The general form of an rpm install command is
82 \fBrpm \-i [install\-options] <package_file>+\fP
84 The <package_file> may be specified as an ftp style URL, in which case
85 the package will be downloaded before being installed. See \fBFTP
86 OPTIONS\fP for information on RPM's built in ftp support.
89 Same as using both \-\-replacepkgs, \-\-replacefiles, and
91 .IP "\fB\-h, \-\-hash\fP"
92 Print 50 hash marks as the package archive is unpacked. Use
93 with \fB\-v\fP for a nice display.
94 .IP "\fB\-\-oldpackage\fP"
95 Allow an upgrade to replace a newer package with an older one.
96 .IP "\fB\-\-percent\fP"
97 Print percentages as files are unpacked from the package archive. This
98 is intended to make RPM easy to run from other tools.
99 .IP "\fB\-\-replacefiles\fP"
100 Install the packages even if they replace files from other, already
102 .IP "\fB\-\-replacepkgs\fP"
103 Install the packages even if some of them are already installed on this
105 .IP "\fB\-\-root \fI<dir>\fP"
106 Do the installation on the system rooted at \fI<dir>\fP. Note that
107 this means the database will be updated under \fI<dir>\fP and any
108 \fIpre\fP or \fIpost\fP scripts are run after a chroot() to \fI<dir>\fP.
109 .IP "\fB\-\-nodeps\fP"
110 Don't do a dependency check before installing the new package.
111 .IP "\fB\-\-noscripts\fP"
112 Don't execute the preinstall or postinstall scripts.
113 .IP "\fB\-\-excludedocs\fP"
114 Don't install any files which are marked as documentation (which includes
115 man pages and texinfo documents).
116 .IP "\fB\-\-includedocs\fP"
117 Install documentation files. This is only needed if \fIexcludedocs: 1\fP
118 is specified in an rpmrc file.
119 .IP "\fB\-\-nodeps\fP"
120 Don't check dependencies before installing the packages.
122 Do not install the package, simply check for and report potential
124 .IP "\fB\-U, \-\-upgrade\fP"
125 Upgrade the package currently installed to the version in the new RPM.
126 This is the same as install, except all other version of the package
127 are removed from the system.
132 The general form of an rpm query command is
134 \fBrpm \-q [query\-options]\fP
136 You may specify the format that package information should be printed
137 in. To do this, you use the \fB\-\-queryformat\fP option, followed by
140 Query formats are modifed versions of the standard \fBprintf(3)\fP
141 formatting. The format is made up of static strings (which may include
142 standard C character escapes for newlines, tabs, and other special
143 characters) and \fBprintf(3)\fP type formatters. As \fBrpm\fP
144 already knows the type to print, the type specifier must be
145 omitted however, and replaced by the name of the header tag to
146 be printed, enclosed by \fB{}\fP characters. The
147 \fBRPMTAG_\fP portion of the tag name may be omitted, and the
148 tag name may be preceded by a \fB\-\fP to format the tag as
151 For example, to print only the names of the packages queried, you
152 could use \fB%{NAME}\fP as the format string. To print the packages
153 name and distribution information in two columns, you could use
154 \fB%\-30{NAME}%{DISTRIBUTION}\fP.
156 \fBrpm\fP will print a list of all of the tags it knows about when
157 it is invoked with the \fB\-\-querytags\fP argument.
159 There are two subsets of options for querying: package selection, and
160 information selection.
162 Package selection options:
164 .IP "\fB\fI<package_name>\fP"
165 Query package named \fB\fI<package_name>\fP.
168 .IP "\fB\-\-whatrequires \fI<capability>\fP"
169 Query all packages that requires \fI<capability>\fP for proper functioning.
170 .IP "\fB\-\-whatprovides \fI<virtual>\fP"
171 Query all packages that provide the \fI<virtual>\fP capability.
172 .IP "\fB\-f \fI<file>\fP"
173 Query package owning \fI<file>\fP.
174 .IP "\fB\-p \fI<package_file>\fP"
175 Query an (uninstalled) package \fI<package_file>\fP.
176 The <package_file> may be specified as an ftp style URL, in which case
177 the package header will be downloaded and queried. See \fBFTP
178 OPTIONS\fP for information on RPM's built in ftp support.
181 Information selection options:
184 Display package information, including name, version, and description. This
185 uses the \fB\-\-queryformat\fP if one was specified.
187 List packages this one depends on (same as \fB\-\-requires\fP).
188 .IP "\fB\-\-provides\fP"
189 List capabilities this package provides.
191 List files in package.
193 Display the \fIstates\fP of files in the package (implies \fB\-l\fP).
194 The state of each file is
195 either \fInormal\fP, \fInot installed\fP, or \fIreplaced\fP.
197 List only documentation files (implies \fB\-l\fP).
199 List only configuration files (implies \fB\-l\fP).
200 .IP "\fB\-\-scripts\fP"
201 List the package specific shell scripts that are used as part of the
202 installation and uninstallation processes, if there are any.
204 Dump file information as follows: path size mtime md5sum mode
205 owner group isconfig isdoc rdev symlink. This must be used with
206 at least one of \fB\-l\fP, \fB\-c\fP, \fB\-d\fP.
209 The general form of an rpm verify command is
211 \fBrpm \-V|\-y|\-\-verify [verify\-options]\fP
213 Verifying a package compares information about the installed
214 files in the package with information about the files taken from the
215 original package and stored in the rpm database. Among other things,
216 verifying compares the size, MD5 sum, permissions, type, owner and group
217 of each file. Any discrepencies are displayed. The package specification
218 options are the same as for package querying.
220 Files that were not installed from the package, for example documentation
221 files excluded on installation using the "\fB\-\-excludedocs\fP" option,
222 will be silently ignored.
224 The format of the output is a string of 8 characters, a possible "\fBc\fP"
225 denoting a configuration file, and then the file name. Each of the 8
226 characters denotes the result of a comparison of one attribute of the file
227 to the value of that attribute recorded in the RPM database. A
228 single "\fB.\fP" (period) means the test passed. The following characters
229 denote failure of certain tests:
246 Mode (includes permissions and file type)
248 .SH SIGNATURE CHECKING
249 The general form of an rpm signature check command is
251 \fBrpm \-\-checksig <package_file>+\fP
253 This checks the PGP signature built into a package to ensure the integrity
254 and the origin of the package.
255 PGP configuration information is read from /etc/rpmrc.
256 See the section on PGP SIGNATURES for details.
258 .SH UNINSTALL OPTIONS
259 The general form of an rpm uninstall command is
261 \fB rpm \-e <package_name>+\fP
263 .IP "\fB\-\-noscripts\fP"
264 Don't execute the preuninstall or postuninstall scripts.
265 .IP "\fB\-\-nodeps\fP"
266 Don't check dependencies before uninstalling the packages.
268 Don't really uninstall anything, just go through the motions.
270 .IP "\fB\-\-nodeps\fP"
271 Don't check for broken dependencies before removing the package.
274 The general form of an rpm build command is
276 \fBrpm \-[b|t]\fIO\fP [build\-options] <package_spec>+\fP
278 The argument used is \fB-b\fR if a spec file is being used to build the package
279 and \fB-t\fR if \fBRPM\fR should look inside of a gzipped (or compressed) tar
280 file for the spec file to use. After the first argument, the next argument
281 (\fIO\fR) specifies the stages of building and packaging to be done and
285 Executes the "%prep" stage from the spec file. Normally this
286 involves unpacking the sources and applying any patches.
288 Do a "list check". The "%files" section from the spec file
289 is macro expanded, and checks are made to insure the files
292 Do the "%build" stage from the spec file (after doing the prep stage).
293 This generally involves the equivalent of a "make".
295 Do the "%install" stage from the spec file (after doing the prep
296 and build stages). This generally involves the equivalent of a
299 Build a binary package (after doing the prep, build, and install stages).
301 Build binary and source packages (after doing the prep, build, and
304 The following options may also be used:
305 .IP "\fB\-\-short\-circuit\fP"
306 Skip straight to specified stage (ie, skip all stages leading up
307 to the specified stage). Only valid with \fB\-bc\fP and \fB\-bi\fP.
308 .IP "\fB\-\-timecheck\fP"
309 Set the "timecheck" age (0 to disable). This value can also
310 be set in rpmrc with "timecheck:". The timecheck value expresses,
311 in seconds, the maximum age of a file being packaged. Warnings
312 will be printed for all files beyond the timecheck age.
313 .IP "\fB\-\-clean\fP"
314 Remove the build tree after the packages are made.
316 Do not execute any build stages.
317 Useful for testing out spec files.
319 Embed a PGP signature in the package. This signature can be used
320 to verify the integrity and the origin of the package. See the
321 section on PGP SIGNATURES for /etc/rpmrc details.
323 .SH REBUILD AND RECOMPILE OPTIONS
325 There are two other ways to invoke rpm:
327 .I "\fBrpm \-\-recompile <source_package_file>+\fP"
329 .I "\fBrpm \-\-rebuild <source_package_file>+\fP"
331 When invoked this way, rpm installs the named source package, and does
332 a prep, compile and install. In addition, \fB\-\-rebuild\fP builds a new
333 binary package. When the build has completed, the build directory is
334 removed (as in \fB\-\-clean\fP) and the the sources and spec file for
335 the package are removed.
337 .SH SIGNING AN EXISTING RPM
339 .I "\fBrpm \-\-resign <binary_package_file>+\fP"
341 This option generates and inserts new signatures for the listed packages.
342 Any existing signatures are removed.
346 In order to use the signature feature RPM must be able to run PGP
347 (it must be installed and in your path), and it must be able to
348 find a public key ring with RPM public keys in it. By default,
349 RPM uses the PGP defaults to find the keyrings (honoring PGPPATH).
350 If your key rings are not located where PGP expects them to be,
351 you must set the following in your /etc/rpmrc
354 Replacement path for /usr/lib/rpm. Must contain your key rings.
357 If you want to be able to sign packages you create yourself, you also
358 need to create your own public and secret key pair (see the PGP manual).
359 In addition to the above /etc/rpmrc entries, you should add the following:
361 .IP "\fBsignature\fP"
362 The signature type. Right now only pgp is supported.
364 The name of the "user" whose key you wish to use to sign your packages.
367 When building packages you then add \-\-sign to the command line.
368 You will be prompted for your pass phrase, and your package will
371 .SH REBUILD DATABASE OPTIONS
373 The general form of an rpm rebuild database command is
375 \fBrpm \-\-rebuilddb\fP
378 The only options this mode supports are \fB-\-dbpath\fP and \fB-\-root\fP.
388 shows the values RPM will use for all of the options that may be set
389 in \fIrpmrc\fP files.
393 RPM includes a simple FTP client to simplify installing and querying packages
394 which are available over the internet. Package files for install, upgrade,
395 and query operations may be specified as an ftp style URL:
398 \fBftp://<user>:<password>@hostname/path/to/package.rpm\fP
400 If the \fB@password\fP portion is omitted, the password will be prompted
401 for (once per user/hostname pair). If both the user and password are
402 omitted, anonymous ftp is used. In all cases passive (PASV) ftp transfers are
405 RPM allows the folowing options to be used with ftp URLs:
407 .IP "\fB\--ftpproxy <hostname>\fP"
408 The host <hostname> will be used as a proxy server for all transfers, which
409 allows users to ftp through firewall machines which use proxy systems. This
410 option may also be specified in an \fIrpmrc\fP file.
412 .IP "\fB\--ftpport <port>\fP"
413 Specifies the TCP port number to use for the ftp connection instead of
415 This option may also be specified in an \fIrpmrc\fP file.
421 /var/lib/rpm/packages
430 .B http://www.redhat.com/rpm
434 Marc Ewing <marc@redhat.com>
435 Erik Troan <ewt@redhat.com>