YUM

Also known as: Yellowdog Updater, Modified

On this page 7

YUM, short for Yellowdog Updater, Modified, is a command-line package manager for RPM-based Linux distributions such as Red Hat Enterprise Linux, CentOS, Fedora and Oracle Linux. In package management, YUM sits above the low-level RPM tool: it downloads packages from repositories, resolves dependencies automatically and installs, updates or removes software as a consistent transaction.

YUM grew out of the Yellowdog Updater used by the Yellow Dog Linux distribution and became the standard updater of the Red Hat family in the 2000s. It was later replaced by DNF, first in Fedora and then in RHEL 8 and later, where the yum command remains available as a compatible front end to DNF. Classic Python-based YUM is still found on RHEL 7, CentOS 7 and systems derived from them.

How YUM installs and updates packages

YUM works with repositories, which are collections of RPM packages accompanied by metadata. Each repository publishes a repodata directory containing repomd.xml and compressed indexes describing every package, its version, its dependencies and the files it provides.

  1. Reading configuration from /etc/yum.conf and the repository files in /etc/yum.repos.d/.
  2. Downloading and caching metadata for every enabled repository, usually under /var/cache/yum.
  3. Resolving dependencies for the requested operation, including packages that must be added, upgraded or removed.
  4. Showing the transaction summary and asking for confirmation unless -y is used.
  5. Downloading and verifying packages against their GPG signatures and checksums.
  6. Running the transaction through the RPM library, then recording it in the YUM history database.

The essential value of YUM lies in step three. Installing an RPM directly with rpm -i fails when a library is missing, whereas YUM finds the providing packages in the repositories and installs them in the right order.

Essential YUM commands

Day-to-day administration with YUM relies on a small, consistent set of subcommands. They operate on package names, globs or provided capabilities such as file paths.

CommandActionTypical use
yum install httpdInstall a package with dependenciesAdding software
yum updateUpdate all installed packagesRoutine patching
yum update --securityApply only security errataRestricted maintenance windows
yum remove httpdRemove a package and dependentsUninstalling software
yum search nginxSearch names and summariesFinding packages
yum provides */semanageFind the package owning a fileLocating missing commands
yum groupinstall "Development Tools"Install a predefined groupPreparing build hosts
yum history undo 42Reverse a past transactionRolling back changes
yum clean allDelete cached metadata and packagesFixing stale metadata
Frequently used YUM commands

The history database deserves special attention. Every transaction receives a number, and yum history info shows exactly what changed. Undo works well for simple installations, but it may fail when older package versions are no longer available in the repositories.

Repositories and configuration

Each repository is defined in a .repo file with a short set of directives. Correct repository configuration determines both what can be installed and how trustworthy it is.

DirectivePurposeExample value
baseurlDirect location of the repositoryAn http, https or file path
mirrorlist or metalinkList of mirrors to choose fromA mirror service address
enabledWhether the repository is used1 or 0
gpgcheckVerify package signatures1 (recommended)
gpgkeyLocation of the signing keyA key file under /etc/pki
priorityPreference among repositories (plugin)1 to 99, lower wins
Important repository directives

Common additional repositories include EPEL, which provides extra packages for Enterprise Linux, and vendor repositories for databases or monitoring agents. Mixing many third-party repositories increases the risk of conflicting package versions, so administrators often enable them only for specific commands with --enablerepo.

YUM compared with DNF, RPM and APT

YUM belongs to a layered toolchain and has close counterparts in other distribution families. The comparison shows where YUM fits and why it was eventually succeeded.

ToolLevelDistribution familyDependency resolution
RPMLow-level package toolRed Hat family, SUSEChecks only, does not fetch
YUMHigh-level managerRHEL 7 and earlier, CentOS 7Python-based resolver
DNFHigh-level managerFedora, RHEL 8 and laterlibsolv SAT solver
ZypperHigh-level manageropenSUSE, SLESlibsolv SAT solver
APTHigh-level managerDebian, UbuntuOwn resolver, works with dpkg
YUM and neighboring package tools

DNF was created because classic YUM had slow and sometimes inconsistent dependency resolution, high memory use and an unstable plugin API. DNF uses the libsolv satellite solver, which handles complex dependency sets faster and more predictably. Most YUM commands work unchanged with DNF, which made migration largely transparent for administrators.

Plugins, pitfalls and good practice

YUM is extended through Python plugins and the companion yum-utils package. Useful extensions include versionlock to pin packages, fastestmirror to select nearby mirrors and tools such as needs-restarting and yumdownloader.

  • Never disable gpgcheck for convenience; unsigned packages remove an important protection against tampering.
  • Run yum clean all when repository changes do not appear, because stale cached metadata is a frequent cause.
  • Avoid interrupted transactions; if one occurs, yum-complete-transaction can finish or clean it up.
  • Pin critical packages such as kernels or database servers with versionlock before unattended updates.
  • Check needs-restarting after updates, since updated libraries are not used until services restart.

For systems still running classic YUM, the more important question is often lifecycle: RHEL 7 and CentOS 7 have reached the end of their standard support periods, so planning a migration to a DNF-based release is part of responsible YUM administration.

The simple explanation

YUM is like an app store for Red Hat-style Linux servers, operated by typing commands. You ask for a program by name, and YUM finds it in trusted online collections. It also downloads every other piece the program needs.

It checks that the files are genuine and installs everything in the correct order. Later, a single command brings the whole system up to date. Newer systems use a successor called DNF, but the same yum commands still work there.

How it is used in practice

An administrator maintains 30 CentOS 7 web servers in a corporate data center. During a monthly maintenance window, she runs yum update --security on a test server first, reviews the transaction summary of 18 packages, and confirms that the web application still works.

On the production servers, she applies the same update through an automation tool, with the database client pinned by the versionlock plugin. One server shows failed metadata downloads, which yum clean all resolves. Afterward, needs-restarting -r identifies the hosts that require a reboot for the new kernel. All servers are patched within the window, and the history database records every change for the audit report.