LinuxCommandLibrary

rpm

RPM package manager for Red Hat systems

TLDR

Query package version

$ rpm -q [package]
copy
List all matching packages
$ rpm -qa '[pattern*]'
copy
Forcibly install package
$ rpm -U [package.rpm] --force
copy
Find file owner
$ rpm -qf [/path/to/file]
copy
List package files
$ rpm -ql [package]
copy
Show package scripts
$ rpm -qp --scripts [package.rpm]
copy
Verify packages
$ rpm -Va '[pattern*]'
copy
Show changelog
$ rpm -q --changelog [package]
copy

SYNOPSIS

rpm [-q|-i|-U|-e|-V] [options] [package]

DESCRIPTION

rpm is the RPM Package Manager for Red Hat-based Linux distributions. It installs, upgrades, removes, and queries software packages in RPM format.
The tool maintains a database of installed packages, handles dependencies, and can verify package integrity. It's the low-level package tool; dnf/yum provide higher-level functionality.

PARAMETERS

-a, --all

All packages
-f, --file _file_
Query package owning file
-l, --list
List files in package
-p, --package _file_
Query package file
--force
Force operation
--nodeps
Ignore dependencies
--scripts
Show scriptlets

MODES

-q, --query

Query installed packages
-i, --install
Install package
-U, --upgrade
Upgrade or install package
-e, --erase
Remove package
-V, --verify
Verify package integrity

CAVEATS

Does not resolve dependencies automatically (use dnf/yum). Package signatures should be verified. Force and nodeps options can break systems. Root required for install/remove.

HISTORY

RPM was originally developed at Red Hat by Marc Ewing and Erik Troan. It became the standard package format for many Linux distributions including Fedora, RHEL, CentOS, and SUSE.

SEE ALSO

dnf(8), yum(8), rpm2cpio(8), rpmbuild(8)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community