Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

4 Answers 4

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
1  
There is a "yum verify" command, although it is in a plugin. –  James Antill Apr 12 '12 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.

share|improve this answer

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

Your Answer

 
discard

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.