๐ŸŽ New User? Get 20% off your first purchase with code NEWUSER20 ยท โšก Instant download ยท ๐Ÿ”’ Secure checkout Register Now โ†’
Menu

Categories

yum Command

Beginner Package Management man(1)

Package manager for older RPM-based systems (legacy)

๐Ÿ‘ 128 views ๐Ÿ“… Updated: Apr 29, 2026
SYNTAX
yum [OPTION]... COMMAND [PACKAGE]...

What Does yum Do?

yum (Yellowdog Updater Modified) is the legacy package manager for RHEL, CentOS, and Fedora. It manages RPM packages with automatic dependency resolution. On RHEL 8+, yum is an alias for dnf.

yum has been the standard Red Hat package manager for over a decade. While dnf is the official successor, yum commands still work on all RPM-based distributions and are found in most existing documentation.

yum uses repositories configured in /etc/yum.repos.d/ to find and download packages.

Options & Flags

OptionDescriptionExample
install Install packages sudo yum install httpd
remove Remove packages sudo yum remove httpd
update Update packages sudo yum update -y
search Search for packages yum search php
info Show package info yum info nginx
list installed List installed packages yum list installed
groupinstall Install a package group sudo yum groupinstall 'Development Tools'

Practical Examples

#1 Install package

Installs nginx with auto-confirmation.
$ sudo yum install -y nginx

#2 Update system

Updates all installed packages.
$ sudo yum update -y

#3 Search packages

Searches for PHP-related packages.
$ yum search php

#4 Clean cache

Clears cached package data to free space.
$ sudo yum clean all

#5 Install EPEL

Installs the EPEL repository for additional packages.
$ sudo yum install epel-release

Tips & Best Practices

yum is dnf on RHEL 8+: On RHEL 8+, CentOS Stream, and Fedora, yum is a symlink to dnf. Your yum commands automatically use dnf.
Use dnf for new work: For new scripts and documentation, use dnf instead of yum. dnf is faster and better at dependency resolution.
RHEL 7 end of life: RHEL/CentOS 7 (which uses real yum) reached end of life. Upgrade to RHEL 8/9 which use dnf.

Frequently Asked Questions

Is yum still supported?
On RHEL 8+, yum is an alias for dnf โ€” it works fine. On RHEL 7, real yum works but the OS is end-of-life.
What is the difference between yum and dnf?
dnf is the modern replacement with better performance. On new systems, yum simply calls dnf. Use dnf for new work.
How do I clean the yum cache?
sudo yum clean all removes cached packages and metadata.

Download Package Management Cheat Sheet

PDF Package Management
View all 31 Linux command cheat sheets โ†’

Master Linux with Professional eBooks

Curated IT eBooks covering Linux, DevOps, Cloud, and more

Browse Books โ†’