-->
Previous | Table of Contents | Next
Page 367
Concise RPM Command
Reference
Page 368
C.1. Global Options
The following options can be used in any of RPM's modes:
-
--quietPrint as little output as possible.
- -vBe a little more verbose.
- -vvBe incredibly verbose (for debugging).
- --root
<dir>Use <dir> as the top-level directory.
- --dbpath
<dir>Use <dir> as the directory for the database.
- --rcfile
<file>Use <file> instead of
/etc/rpmrc and $HOME/.rpmrc.
C.2. Informational Options
The following options are used to display information about RPM:
Format: rpm <option>
-
--versionPrint the version of RPM being used.
- --helpPrint a help message.
-
--showrcShow rcfile information.
-
--querytagsList the tags that can be used with
--queryformat.
C.3. Query Mode
RPM's query mode is used to display information about packages.
Format: rpm --query <options>
or
rpm -q <options>
C.3.1. Package Specification Options for Query Mode
No more than one of the following options may be present in every query command. They
are used to select the source of the information to be displayed. Where plus signs appear,
more than one item may be included, separated by a space:
-
<packagename>Query the named package.
- -aQuery all packages.
- -f
<file>+Query package owning
<file>.
Page 369
- -g
<group>+Query packages with group
<group>.
- -p
<packagefile>+Query (uninstalled) package
<packagefile>.
- --whatprovides
<i>Query packages that provide
<i> capability.
- --whatrequires
<i>Query packages that require
<i> capability.
C.3.2. Information Selection Options for Query Mode
One or more of the following options may be added to any query command. They are used
to select what information RPM will display. If no information-selection option is present on
the command line, RPM will simply display the applicable package label(s):
- -iDisplay package information.
- -lDisplay package file list.
- -sShow file states (implies
-l).
- -dList only documentation files (implies
-l).
- -cList only configuration files (implies
-l).
-
--dumpShow all available information for each file (must be used with
-l, -c, or -d).
-
--providesList capabilities that the package provides.
-
--requires, -RList capabilities that the package requires.
-
--scriptsPrint the various (un)install, verification scripts.
- --queryformat
<s>Use <s> as the header format (implies
-i).
- --qf
<s>Shorthand for --queryformat.
C.4. Verify Mode
RPM's verification mode is used to ensure that a package is still installed properly:
Format: rpm --verify <options>
or
rpm -V <options>
or
rpm -y <options>
Page 370
C.4.1. Options for Verify Mode
The following options can be used on any verify command:
-
--nodepsDo not verify package dependencies.
-
--nofilesDo not verify file attributes.
-
--noscriptsDo not execute the package's verification script.
C.5. Install Mode
RPM's installation mode is used to install packages.
Format: rpm --install <packagefile>
or
rpm -i <packagefile>
C.5.1. Options for Install Mode
The following options can be used on any install command:
- -h,
--hashPrint hash marks as package installs (good with
-v).
- --prefix
<dir>Relocate the package to
<dir>, if relocatable.
-
--excludedocsDo not install documentation.
-
--forceShorthand for --replacepkgs and
--replacefiles.
-
--ignorearchDo not verify package architecture.
-
--ignoreosDo not verify package operating system.
-
--includedocsInstall documentation.
-
--nodepsDo not check package dependencies.
-
--noscriptsDo not execute any installation scripts.
-
--percentPrint percentages as package installs.
-
--replacefilesInstall even if the package replaces installed files.
-
--replacepkgsReinstall if the package is already present.
-
--testDo not install, but tell whether it would work.
Page 371
C.6. Upgrade Mode
RPM's upgrade mode is used to upgrade packages.
Format: rpm --upgrade <packagefile>
or
rpm -U <packagefile>
C.6.1. Options for Upgrade Mode
The following options can be used on any upgrade command:
- -h,
--hashPrint hash marks as package installs (good with
-v).
- --prefix
<dir>Relocate the package to
<dir>, if relocatable.
-
--excludedocsDo not install documentation.
-
--forceShorthand for --replacepkgs,
--replacefiles, and --oldpackage.
-
--ignorearchDo not verify package architecture.
-
--ignoreosDo not verify package operating system.
-
--includedocsInstall documentation.
-
--nodepsDo not verify package dependencies.
-
--noscriptsDo not execute any installation scripts.
-
--percentPrint percentages as package installs.
-
--replacefilesInstall even if the package replaces installed files.
-
--replacepkgsReinstall if the package is already present.
-
--testDo not install, but tell whether it would work.
-
--oldpackageUpgrade to an old version of the package
(--force on upgrades does this automatically).
C.7. Erase Mode
RPM's erase mode is used to erase previously installed packages.
Format: rpm --erase <package>
or
rpm -e <package>
Page 372
C.7.1. Options for Erase Mode
The following options can be used on any erase command:
-
--nodepsDo not verify package dependencies.
-
--noscriptsDo not execute any installation scripts.
C.8. Build Mode
RPM's build mode is used to build packages.
Format: rpm -b<stage> <options>
<specfile>
(Note that -vv is the default for all build mode commands.)
C.8.1. Build Mode Stages
One of the following stages must follow the -b option:
-
pPrep (unpack sources and apply patches).
- lList check (do some cursory checks on
%files).
- cCompile (prep and compile).
- iInstall (prep, compile, install).
- bBinary package (prep, compile, install, package).
- aBinary/source package (prep, compile, install, package).
C.8.2. Options for Build Mode
The following options can be used on any build command:
-
--short-circuitSkip straight to specified stage (only for
c and i).
-
--cleanRemove build tree when done.
-
--signGenerate PGP signature.
- --buildroot
<s>Use <s> as the build root.
- --buildarch
<s>Use <s> as the build architecture.
- --buildos
<s>Use <s> as the build operating system.
-
--testDo not execute any stages.
- --timecheck
<s>Set the time check to <s> seconds
(0 disables it).
Page 373
C.9. Rebuild Mode
RPM's rebuild mode is used to rebuild packages from a source package file. The source
archives, patches, and icons that comprise the source package are removed after the binary
package is built. Rebuild mode implies --clean.
Format: rpm --rebuild <options> <source-package>
(Note that -vv is the default for all rebuild mode commands.)
C.9.1. Options for Rebuild Mode
Only the global options may be used.
C.10. Recompile Mode
RPM's recompile mode is used to recompile software from a source package file. Unlike
--rebuild, no binary package is created.
Format: rpm --recompile <options> <source-package>
Note that -vv is the default for all recompile mode commands.
C.10.1. Options for Recompile Mode
Only the global options may be used.
C.11. Resign Mode
RPM's resign mode is used to replace a package's signature with a new one.
Format: rpm --resign <options> <packagefile>+
C.11.1. Options for Resign Mode
Only the global options may be used.
C.12. Add Signature Mode
RPM's add signature mode is used to add a signature to a package.
Format: rpm --addsign <options> <packagefile>+
Page 374
C.12.1. Options for Add Signature Mode
Only the global options may be used.
C.13. Check Signature Mode
RPM's check signature mode is used to verify a package's signature.
Format: rpm --checksig <options> <packagefile>+
or
rpm -K <options> <packagefile>+
C.13.1. Options for Check Signature Mode
The following option can be used on any check signature command:
-
--nopgpSkip any PGP signatures (size and MD5 only).
C.14. Initialize Database Mode
RPM's initialize database mode is used to create a new RPM database.
Format: rpm --initdb <options>
C.14.1. Options for Initialize Database Mode
Only the global options may be used.
C.15. Rebuild Database Mode
RPM's rebuild database mode is used to rebuild an RPM database.
Format: rpm --rebuilddb <options>
C.15.1. Options to Rebuild Database Mode
Only the global options may be used.
Previous | Table of Contents | Next