Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As we know yum is a package management system which was built on top of rpm. It's also a command line utility which is a(rudely speaking) broader version of rpm, it resolves many problems(the main is obviously dependencies) which rpm doesn't care of. Is there any particular case when using rpm command would be more appropriate than yum?

share|improve this question
up vote 11 down vote accepted

rpm is used to interact with the RPM database on your computer. So you can look at the current state of the database, verify packages, check the dependencies of installed software, etc.

yum uses rpm (actually, it uses an rpm python library) for much of its local operations, but it only can perform a limited number of the functions that the rpm command can perform, only related to the installation, updating and removal of software. yum also can talk to local and remote software repositories, and generate dependency graphs to manage software packages, which rpm cannot.

share|improve this answer

rpm does loads of stuff, only some of which is supplanted by yum. For example, verifying installed packages (--verify). Compare the yum and rpm manual pages.

share|improve this answer
There is a "yum verify" command, although it is in a plugin. – James Antill Apr 12 '12 at 17:45

The other "appropriate" case is when you are trying to install/compile source-code and do not want to use (or do not have) root-privileges.

As ordinary user you are not allowed to use yum for installation, while you can use rpm to install source-rpms into your local rpm-build-directory.

share|improve this answer

In newer versions of yum the rpmdb isn't the only thing that is altered by transactions (installing or removing packages), so it's actively harmful to go behind yum and use rpm directly to do that ... and yum will complain at you, if you do that.

The only thing that comes to mind that rpm can do and yum can't do is signing packages (rpm -K) ... but some operations might be slightly faster, and there are obviously just things people remember better/easier.

share|improve this answer

There are cases where you use rpm first, to perform some preliminary stuff, before yum. A good example is MySQL.

(1) rpm -iv mysql-community-release-el6-5.noarch.rpm

At this point the mysql/yum repository is ready and you can start relying on yum only to get the main mysql and the rest of optional packages:

(2) yum install mysql-community-server

See details:


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.