Red Hat Package Manager

With RPM, software is managed in discrete packages, a collection of the files that make up the software, and instructions for adding, removing, and upgrading those files. RPM also makes sure you never lose configuration files by backing up existing ones before overwriting. RPM also tracks which version of an application is currently installed on your system.


A key feature of RPM is that filenames can be specified in Uniform Resource Locator (URL) format. For example, if you know that the package foo.rpm is on the FTP server, in the /pub directory, you can specify that filename as is smart enough to log on to the FTP server anonymously and pull down the file.

What is a Package?

  • In the generic sense, a package is a container. It includes the files needed to accomplish a certain task, such as the binaries, configuration, and documentation files in a software application.

  • It also includes instructions on how and where these files should be installed, and how the installation should be accomplished.

  • A package also includes instructions on how to uninstall itself. RPM packages are often identified by filenames that usually consist of the package name, the version, the release, and the architecture for which they were built.

  • For example, the package penguin-3.26.i386.rpm indicates this is the (fictional) Penguin Utilities package, version 3, and release 26. i386 indicates it has been compiled for the Intel architecture.

  • Note that although this is the conventional method of naming RPM packages, the actual package name, version, and architecture information are read from the contents of the file by RPM, not the filename.

  • You could rename the file blag.rpm, but it would still install as penguin-3.26.i386.rpm.

What is RPM?

  • At the heart of RPM is the RPM database. This database tracks each file in a package is located, its version.

  • The RPM also maintains an MD5 checksum of each file. Checksums are used to determine if a file has been modified, which comes in handy if you need to verify the integrity of one or more packages.

  • The RPM database makes adding, removing, and upgrading packages easy, because RPM knows which files to handle, and where to put them.RPM also takes care of conflicts between packages.

  • For example, if package X, which has already been installed, has a configuration file called /etc/someconfig, and you attempt to install a new package, Y, which wants to install the same file, RPM will manage this conflict by backing up your previous configuration file before the new file is written.

  • The workhorse of the RPM system is the program rpm. rpm is the driver responsible for maintaining the RPM databases.

Listing files associated with RPMs

Sometimes you’ll find yourself installing software which terminates with an error requesting the presence of particular file. In many cases the installation program doesn’t state the RPM package in which the file can be found. It is therefore important to be able to determine the origin of certain files, by listing the contents for RPMs in which you suspect the files may reside.

Listing files ror already installed RPMs

This can be useful if you have to duplicate a working server that is already in a production environment. Sometimes the installation of an application fails on the new server due to the lack of a file that resides on the old one. In this case you need to know which RPM on the old server contains the file. You can use the “- ql” qualifier to list all the files associated with an installed RPM.

In this example we test to make sure that the NTP package is installed using the"-q" qualifier, then we use the “-ql” qualifier to get the file listing.

[root@wilshire~]# rpm -q ntp ntp-4.1.2-0.rc1.2
[root@wilshire~]# rpm -ql ntp /etc/ntp
[root@wilshire~]# /usr/share/doc/ntp-4.1.2/rdebug.htm /usr/share/doc/ntp-
4.1.2/refclock.htm /usr/share/doc/ntp-4.1.2/release.htm
[root@wilshire ~]#managing RPMs (install, re-install, upgrade, erase


  • RPM has some disadvantages too. RPM is criticized for inconsistency in package names and content, which makes automatic dependency handling difficult.

  • The RPM packages created for a particular Linux distribution may not work with another distribution due to missing dependency. This dependency problem is termed as ‘dependency hell’.

  • Even with its above disadvantages, RPM is the choice of many leading Linux vendors.

  • Among several package management systems, the ease-of-use of RPM makes it the leading-edge Package Manager.


  • Yum or Yellow dog Update, Modified is a package manager that was developed by Duke University to improve the installation of RPMs.

  • Yum searches numerous repositories for packages and their dependencies so they may be installed together in an effort to alleviate dependency issues.

  • Red Hat Enterprise Linux 6.3 uses Yum to fetch packages and install RPMs. Yum uses a configuration file at /etc/yum.conf.

  • There are multiple ways by which you can install a repository on the system and install/update packages: Add an existing repository

  • Setup a new repository having packages populated from ISO’s downloaded from RHN

  • Register the system on RHN and subscribe to the channels depending on the subscription you have.

Here are some useful commands.

Install a package: yum install package Example:

#yum install httpd

Remove a package: yum remove package Example:

#yum remove httpd

Update a package: yum update package Example:

#yum update httpd

Search for a package: yum search package Example:

#yum search httpd

Find information about a package: yum info package

Example: #yum info httpd

Subscribe For More Content