[CentOS] is yum a complete substitute of rpm?

Sat Feb 13 16:35:54 UTC 2010
Jim Green <student.northwestern at gmail.com>

On 13 February 2010 10:27, Robert P. J. Day <rpjday at crashcourse.ca> wrote:
> On Sat, 13 Feb 2010, Jim Green wrote:
>
>> On 13 February 2010 10:13, Ron Loftin <reloftin at twcny.rr.com> wrote:
>> >
>> > On Sat, 2010-02-13 at 10:00 -0600, Jim Green wrote:
>> >> Dear Centos community,
>> >> I am new to centos/redhat and I would like to know on a centos system,
>> >> can I use yum alone to do all package management? I don't want to learn
>> >> two systems and confuse myself, I understand yum is much better than
>> >> rpm if is the case?
>> >
>> > I expect that you will get a bunch of replies on this.
>> >
>> > The short form is that yum lives on TOP of RPM.  It is not a replacement
>> > for RPM.
>> >
>> > Yum does most of the thinking for you as far as dependency
>> > management. It is much more user-friendly, and is the preferred
>> > mechanism for software installation and maintenance because it
>> > does the dependency resolution for you, and saves much in the way
>> > of headaches, elevated stress, confusion, and RSI from excessive
>> > keyboard use.
>> >
>> > All that being said, there are times when you do want to use RPM
>> > by itself, without Yum.  If you stay with CentOS and/or RedHat
>> > long enough, you will run across this situation now and then.
>>
>> Thank Robert and Ron, Could you list an example where I need to use
>> rpm command alone? I used rpm to install stand alone package if that
>> is the case.
>
>  i suspect there are yum alternatives for some of these but here's
> some stuff i like:
>
>  $ rpm -qa                     # list all installed packages

yum list installed

>  $ rpm -qR <pkgname>           # list dependencies of package

yum deplist <pkgname>


>  $ rpm -ql <pkgname>           # display list of files in package

>  $ rpm -qf <filename>          # what package is <filename> from?

yum provides <filename>

this kind of exercise is fun. I came from debian and it is fun to make matches:)