ODOC: rpm

rpm — RedHat Package Manager


RPM is a Package Manager, which can be used to build, install, query, verify, update, & erase individual software packages.

A package consists of an archive of files and meta-data used to install & erase the archive files. The meta-data includes helper scripts, file attributes, & descriptive information about the package.

Packages come in two varieties: binary packages, used to encapsulate software to be installed, & source packages, containing the source code & recipe necessary to produce binary packages.


$ rpm -qa — List all installed RPMs.

$ rpm -qf /usr/bin/gcc — Show which package installed this file.

$ rpm -qi -filesbypkg gcc-3.2.2-5 — Show the information and list of files from this package

$ rpm -qR gcc-3.2.2-5 — Show the dependency of this package.

$ rpm -q gcc –qf “%-30{NAME} %10{SIZE} %{DISTRIBUTION}n” — Show selected info tags of the package installed gcc.

$ rpm –querytags — Show all supported TAGs.

$ rpm -ivh new.rpm — Install the new RPM. (v – Verbose, h- Show Progress bar).

$ rpm -U latest.rpm — Update an Installed RPM.

$ rpm -F latest.rpm — Freshen (Update only if installed).

$ rpm -e Package-Name — Remove a package.

Read: man rpm

rpm, odoc, linux, gnu/linux