Package Management

rpm

Low-level RPM package manager for Red Hat-based distributions.

Synopsis

syntax
rpm [OPTION]... PACKAGE...

Examples

Install an RPM file
sudo rpm -ivh package.rpm
Find installed nginx packages
rpm -qa | grep nginx
List files in nginx package
rpm -ql nginx
Find which package owns a file
rpm -qf /usr/bin/curl

Common options

FlagDescription
-iInstall package
-eErase (remove) package
-qQuery package
-qaQuery all installed
-qlList files in package
-VVerify package

About rpm

The `rpm` command low-level RPM package manager for Red Hat-based distributions. Package management commands install, update, and remove software on Linux distributions.

Each distribution family has its own package manager — apt for Debian/Ubuntu, yum/dnf for RHEL/Fedora, pacman for Arch, and so on. Understanding your distro's package manager is one of the first steps in Linux administration.

The command accepts 6 commonly used flags shown above, though the full set of options is available in the man page (`man rpm`). The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.

Related commands

More Package Management Commands

Other commands in the Package Management category

Related tools