Name

rpm — stdin  stdout  - file  -- opt  --help  --version

Synopsis

rpm [options] [files]

If you prefer to download and install RPM packages by hand, use rpm, the same package-management program that yum runs behind the scenes. Unlike yum, rpm works locally on your computer: it does not search software archives on the Internet for new packages.

rpm not only installs the software, but also makes sure your system has all prerequisites. For example, if package superstuff requires package otherstuff that you haven’t installed, rpm will not install superstuff. If your system passes the test, however, rpm completely installs the software.

RPM filenames typically have the form name-version.architecture.rpm. For example, emacs-23.1-17.i386.rpm indicates the emacs package, version 23.1-17, for i386 (Intel 80386 and higher) machines. Be aware that rpm sometimes requires a filename argument (like emacs-23.1-17.i386.rpm) and other times just the package name (like emacs).

Action

rpm command

Check if a package is installed

rpm -q package_name

Install a package file

rpm -ivh package_file.rpm

Learn about a package

rpm -qi package_name

List the contents of a package

rpm -ql package_name

Discover which package an installed file belongs to

rpm -qf /path/to/file

Update an installed package

rpm -Uvh package_file.rpm

Remove an installed package

rpm -e package_name

List all packages installed on the system

rpm -qa | less

Get Linux Pocket Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.