YUMmy!!

Posted on

Managing software is something that often gets taken for granted. It's so foundational to our everyday lives that we sometimes overlook the complexity involved in keeping packages and their dependencies straight. The tiny little utility yum has so much to offer and can do such cool stuff. It's one of our most common questions here at Red Hat support is how to use and sometimes bend yum to your wishes.  So out of the gate to install/uninstall is pretty simple:

   yum install PACKAGE
   yum remove PACKAGE

or if you're lazy like me and just want all of the damn updates done you can go all out and run:

   yum update

and that should grab all the newest stuff and associated dependencies. I can understand if you're more cautious than I and run

   yum update PACKAGE

We've got a great little article that summarizes a lot of the basics of using yum really, really well:

   What is yum and how do I use it?

     https://access.redhat.com/site/solutions/9934

There's even a video on our portal about it:

   Basic yum usage (video)

     https://access.redhat.com/knowledge/videos/214873

Now the newer the version of RHEL you're on the more cool things your yum can do. There's a whole boat-load of things yum can also do for you, depending on how fancy you want to be or what you're looking to do. Have you ever wondered how something got installed of what else depends on it?

   yum whatprovides PACKAGE

conversely, you can ask what needs a given package by:

yum deplist PACKAGE

Sometimes you just want to download the package (for whatever reason). Here's a great article on this:

   How do I use yum to download a package without installing it?

     https://access.redhat.com/site/solutions/10154

From there there's some interesting things you can do with the packages

   How to update packages by yum command without Internet?

     https://access.redhat.com/site/solutions/42139

   How do I configure a yum local repository to share the contents of a DVD ISO via HTTP on Red Hat Enterprise Linux?

     https://access.redhat.com/site/solutions/7227

Other times you want to be very precise and only apply certain updates. There are a few ways to do this, first we'll look at getting only security updates:

yum install yum-security

You can look at this more in-depth with this article:

   Is it possible to limit yum so that it lists or installs only security updates?

     https://access.redhat.com/site/solutions/10021

Sometimes you'll have some hard requirements about package versions and you need to figure out a way to upgrade, but not X or Y package. There are a few ways to do this documented here:

   How to prevent yum update from upgrading the RHEL version?

     https://access.redhat.com/site/solutions/33807

   How do I exclude kernel or other packages from getting updated in Red Hat Enterprise Linux while updating system via yum?

     https://access.redhat.com/site/solutions/10185

And sometimes this will go poorly and turn pear-shaped for you and you might want to think about backing out a change. Again, there are a few different ways to deal with this:

   How can I use yum to downgrade or rollback some package updates?

     https://access.redhat.com/site/solutions/29617

   yum fails with missing dependency error

     https://access.redhat.com/site/solutions/21217

   How to use yum history to roll back an update in Red Hat Enterprise Linux 6?

     https://access.redhat.com/site/solutions/64069

And this all honestly only scratches the surface. Serioulsy it's a small little package that can do so much for you. So how are you all leveraging yum? What cool tricks or switches are you using to make yum make your management of RHEL easier? The group would love to hear about it! 

Responses