LinuxCommandLibrary

yum

Manage and install software packages

TLDR

View documentation for the original command

$ tldr dnf
copy

SYNOPSIS


yum [options] [command] [package ...]
yum [options] [group or environment]

PARAMETERS

-y
    Automatically answer yes to all prompts, useful for scripting.

install package(s)
    Installs one or more specified packages, automatically resolving and installing dependencies.

update [package(s)]
    Updates specified packages to their latest available version, or updates all packages if none are specified.

remove package(s)
    Removes one or more packages from the system, including dependencies that are no longer needed.

search keyword(s)
    Searches for packages that match the given keywords in their name, summary, or description.

info package(s)
    Displays detailed information about specified packages, such as version, size, description, and repository.

list [available|installed|updates|package-name]
    Lists packages based on various criteria, e.g., all available, currently installed, or those with updates.

check-update
    Checks for available package updates without performing any installations or downloads.

clean [all|packages|metadata|headers|dbcache]
    Cleans various yum caches (e.g., downloaded packages, repository metadata) to free up disk space.

repolist [all|enabled|disabled]
    Displays a list of configured software repositories, showing their status (enabled/disabled) and number of packages.

provides filename
    Finds which package provides a specific file or capability.

history [info|list|undo|redo]
    Views or manages the transaction history of yum operations, allowing for rollbacks or re-application of changes.

DESCRIPTION

yum (Yellowdog Updater, Modified) is a command-line utility for package management on RPM-based Linux distributions, such as CentOS, Fedora (older versions), and Red Hat Enterprise Linux (RHEL). Its primary function is to automate the process of installing, updating, removing, and managing software packages, along with their dependencies, from configured software repositories. yum simplifies system administration by handling complex dependency resolution, ensuring that all necessary libraries and components are installed when a new application is added or updated. It fetches packages from remote repositories, which are collections of software, making it easy for users to keep their systems up-to-date and secure. Although largely superseded by dnf in modern distributions, yum remains a fundamental tool for many legacy systems and often acts as an alias for dnf on newer installations.

CAVEATS

yum has largely been superseded by dnf in recent Fedora, CentOS Stream, and RHEL versions, primarily due to dnf's improved performance, better dependency resolution, and modernized codebase. While the yum command is still present on many newer systems (often acting as an alias to dnf for compatibility), its direct development has mostly ceased. Older yum versions can sometimes be slower and less efficient than dnf for large-scale operations or complex dependency scenarios. Dependency issues, though generally handled well, can occasionally lead to 'dependency hell' in poorly managed systems.

<I>REPOSITORIES</I>

yum relies on software repositories, which are network locations or local directories containing packages and metadata (information about packages). These repositories are configured via files in the /etc/yum.repos.d/ directory, typically ending with a .repo extension. Each .repo file defines one or more repositories, specifying their URL, GPG key for verification (to ensure package authenticity), and whether they are enabled. yum uses this configuration to locate, download, and verify packages, ensuring software is obtained from trusted sources.

<I>CONFIGURATION</I>

The main configuration file for yum is /etc/yum.conf. This file contains global settings such as the default root directory for packages, caching options, GPG check settings, and plugin configurations that apply to all yum operations. Individual repository settings, which define specific package sources, are typically managed in separate .repo files within the /etc/yum.repos.d/ directory, allowing for modular and granular control over which repositories yum uses for package operations.

HISTORY

yum was originally developed by Duke University in 2003, evolving from the Yellowdog Updater (YUP) tool used by Yellow Dog Linux. It quickly gained popularity for its robust ability to handle package dependencies and became the standard package manager for Red Hat Enterprise Linux, Fedora (until dnf), and CentOS. Its development aimed to provide a user-friendly and reliable interface over the low-level rpm utility. While revolutionary in its time, yum began showing its age, particularly in performance and advanced dependency resolution, leading to the development of dnf (Dandified Yum), which became the default package manager for Fedora 18+ and RHEL 8+, effectively taking over yum's role while retaining a similar command-line syntax.

SEE ALSO

dnf(8), rpm(8), apt(8), zypper(8)

Copied to clipboard