YUM Update: Answers to What, Why, and How

yum update - how it can be useful to you

yum update command

YUM update is one among the most useful utilities in Linux. There are utilities we use in our everyday life like

mv
and
cp
and then there are those that are total powerhouses like
init
and
etcd
. If you are one among those who deal with packages a lot, YUM is your friendliest utility out there. Let’s see why
yum update
is important.

YUM: What is it?

For those who have been using a different package manager, YUM (Yellowdog Updater, Modified) is a robust package manager usually pre-installed in all RPM based Linux systems like RedHat enterprise Linux (RHEL), CentOS (approaching EOL – but that is a story for another day), Oracle Linux, and Fedora.  In simpler terms, YUM is a tool that helps you manage all the programs in your Linux device. Getting a package, updating it, removing it, or finding the dependencies, YUM is the only utility you need.

Why Should You Update YUM?

Like any tool, there is always scope for improvement in YUM as well. Yum updates could be rolled out for various reasons including:

  • Security enhancements
  • Bug fixes
  • Enhanced compatibility with latest versions of Linux distributions
  • New features
  • Performance improvements

YUM Update: How Do I Update YUM?

Follow these simple instructions to get YUM updated to the latest version.

  1. Check the version of YUM installed on your device by running the command:
    yum –version
    .
  2. Login as a root user by running this command and entering the password:
    sudo su -
  3. Execute the command:
    yum update
  4. If the latest updates are required, type “
    y
    ” and press the Enter key to initiate the update.
  5. Once the update is completed, restarting YUM is not required as it is a simple package manager and does not have a dedicated process. If you wish to update the metadata cache used by YUM, execute this command:
    yum makecache
    .
  6. If you face any issues related to outdated cache data of YUM, execute this command to clean YUM cache:
    yum clean all
    .

Useful YUM Commands

Here is a list of YUM commands and their functions to get you going. Though there are many, we will limit to the top 5 YUM commands based on common usage.

  1. yum install <package name>
    : Installs the specified package and also its dependencies.
  2. yum remove <package name>
    : Removes the package specified in the command.
  3. yum search <name or description>
    : Searches and lists all the packages relevant to the specified keyword.
  4. yum info <package name>
    : Lists the details of the package like its version, description, dependencies, and size.
  5. yum check-update
    : Lists all available updates for the package but does not install them.

Bonus command:

yum update --security
: Installs all the available security updates.

The Time When
yum update
Came In Handy

An organization-wide audit is underway and you remember delegating the task of keeping all the packages updated to a trusted friend of yours. You sense the auditor coming to your department next. You ask your friend if the updates have been applied and the friend asks “what updates?”. That is when you pull up the terminal window and execute

yum update
command to save the day.

YUM Alternatives

YUM is preinstalled on many Linux distributions like CentOS, RHEL, Amazon Linux (by AWS), and Oracle Linux. Fedora now uses Dandified YUM in its latest versions.

That being said, some users prefer other package managers like Dandified YUM (DNF), APT (Advanced Package Tool), Pacman (Arch Linux), Portage, and ZYpp.

The Wrap Up

As a robust, reliable, and handy tool, YUM is your friend when you are dealing with multiple packages and dependencies. Managing packages, resolving dependencies, finding the right package for the job—YUM is the one stop shop. Updating YUM keeps you loaded with all the features and security updates that come with each YUM update.