Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-08-2009, 12:07 PM   #1
LQ Newbie
Registered: Oct 2008
Posts: 4

Rep: Reputation: 0
Difference of using RPM and YUM in updating packages

I have been using both the rpm and yum commands to update packages and I know that yum has the advantage of resolving the dependencies. I just don't know how the logic works.

For example, if I have downloaded a newer package e.g. A.rpm and I use rpm -Uvh A to upgrade an older version of A. The command returns an error message of "Failed Dependencies - A is needed by B" so I try to install B, and another error message "Failed Dependencies - B is need by (installed) C" comes up and this can go on and on.

Let's say in this example, A only needs B and C to be installed first, so I have to install it using something like rpm -Uvh B C A. In order for this to work, I have to find the B and C either from pointing to the original RedHat install CD or download it from Red Hat Network.

However, if I am using yum, it will automatically install A after I create a repository. I do not understand how and where yum is able to find B and C if they do not exist in the original OS install. Or is it that yum can bypass the requirement to first install B and C in order to upgrade A?

I have looked for Red Hat knowledge database and all I find is how to guide but there is no detailed explanation of how it works.

If I want to maintain an Red Hat OS up to date but I do not want to add additional RPMs i.e. updating A will require installing additional B and C, then what option can I have?

Many thanks for any suggestion.
Old 04-08-2009, 01:41 PM   #2
Senior Member
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
As far as understanding where it got the extra dependencies for installing A; it either found them on the system or checked the online repos.

yum update will not install just any packages. It will only update those packages which are already installed. In certain cases newer versions of a given packages will have new dependencies and in only that case will additional (new) packages be installed (as opposed to updated). Either way you update (rpm or yum) you will get the same amount (GB) of packages. It is just easier to let yum hunt down the dependencies for you. Confirming what yum is going to install is an easy way to monitor what it is doing. It will list what packages it is upgrading as well as what new packages it is installing (it automatically list them separately).
Old 04-11-2009, 11:51 AM   #3
LQ Newbie
Registered: Oct 2008
Posts: 4

Original Poster
Rep: Reputation: 0
I now understand the background logic of using RPM and YUM much more. Thanks.
Old 04-12-2009, 09:08 PM   #4
Registered: Apr 2009
Posts: 108

Rep: Reputation: 24
Yum is actually a higher level approach to deal with RPM packages. For this Yum needs to have repository information (a list of available packages at some website) to do it's job. Proper RPM packages will have dependency information available anyway.

Last edited by Tinkster; 10-30-2010 at 04:24 PM.
Old 04-12-2009, 09:19 PM   #5
Senior Member
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172

Sorry maresmasb but yum does not need a repo to work. See man yum, the localinstall section. It does need a repo IF there are dependencies required (source for dependencies).


command, rpm, yum

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
YUM - disable certain packages from updating Micro420 Fedora 5 03-19-2010 12:17 PM
updating yum packages list bakhanbeigi Linux - Networking 3 08-24-2008 02:47 AM
Installing, Updating packages w/Yum mickeyboa Fedora 4 07-05-2007 04:27 PM
difference betwenn yum and rpm -i Balakrishna Linux - Newbie 2 12-26-2006 01:16 AM
Difference between .src.rpm & .tar.gz packages chinmay nautiya Linux - Software 18 08-10-2006 08:00 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:54 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration