O'Reilly logo

LPI Linux Certification in a Nutshell, 3rd Edition by James Stanger, Bruno Gomes Pessanha, Stephen Addison Schneiter, Adam Haeder

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

rpm

Syntax

rpm -i [options]
(also rpm --install)
rpm -U [options] (also rpm --upgrade)
rpm -e [options] (also rpm --uninstall)
rpm -q [options] (also rpm --query)
rpm -V [options] (also rpm --verify)

Install/upgrade mode

The install mode (rpm -i) is used to install new packages. A variant of install mode is the upgrade mode (rpm -U), where an installed package is upgraded to a more recent version. Another variant is the freshen mode (rpm -F), which upgrades only packages that have an older version already installed on the system. But rpm’s -F option has limited value, since it doesn’t handle dependency changes at all. In other words, if a new version of a package requires that another package be installed, -F won’t automatically install the new package, even if it is listed on the command line.

Frequently used install and upgrade options

--force

Allows the replacement of existing packages and of files from previously installed packages; for upgrades, it allows the replacement of a newer package with an older one. (Literally, it is equivalent to setting all of the options --replacepkgs, --replacefiles, and --oldpackage.) Use this option with caution.

-h (also --hash)

Prints a string of 50 hash marks (#) during installation as a progress indicator.

--nodeps

Allows you to install a package without checking for dependencies. This command should be avoided because it makes the dependency database inconsistent.

--test

Runs through all the motions except for actually writing files; it’s useful ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required