rpm (RPM Package Manager, originally Red Hat Package Manager) is the low-level package format and tool used by Red Hat, Fedora, CentOS, SUSE, and many other distributions. Like dpkg, it handles individual .rpm files and does not resolve dependencies—that is the job of higher-level tools like dnf or zypper.
sudo rpm -ivh package.rpm # install
sudo rpm -Uvh package.rpm # upgrade
sudo rpm -e package # erase (remove)
rpm -qa # query all installed
rpm -qi nginx # info about installed package
rpm -ql nginx # list files
rpm -qf /etc/nginx/nginx.conf # which package owns file
rpm -V nginx # verify integrity
The RPM database lives in /var/lib/rpm/ and is queried whenever you install or remove a package. RPM packages include rich metadata (changelog, license, dependencies, triggers), pre- and post-install scripts, and cryptographic signatures verified against keys imported with rpm --import.
While its dependency handling is less sophisticated than dpkg/apt's by reputation, modern dnf and its libraries (libsolv) have closed the gap. RPM's long tenure in enterprise Linux (since 1997) makes it deeply integrated into the Red Hat world; tools like rpm-build, mock, and Copr support creating custom packages.
Related terms: dnf, yum, Red Hat Enterprise Linux, Fedora, Package Manager
Discussed in:
- Chapter 11: Package Management — dnf: The Red Hat Way
Also defined in: Textbook of Linux