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?

5 Answers 5


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.


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.

  • 1
    There is a "yum verify" command, although it is in a plugin. Commented Apr 12, 2012 at 17:45

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.


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.


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:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .