YUMmy!
Here's a discussion that's been cropping up a lot for me lately. I've had several people ask me about the great things you can do with yum.
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?
There's even a video on our portal about it:
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?
From there there's some interesting things you can do with the packages
How to update packages by yum command without Internet?
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?
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?
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?
yum fails with missing dependency error
How to use yum history to roll back an update in Red Hat Enterprise Linux 6?
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!