Package Management

yum

Package manager for RHEL/CentOS 7 and earlier using RPM packages.

Synopsis

syntax
yum [OPTION]... COMMAND [PACKAGE]...

Examples

Install Apache web server
sudo yum install httpd
Update all packages
sudo yum update
Search for Python 3 packages
yum search python3
Show nginx package details
yum info nginx

Common options

FlagDescription
installInstall packages
removeRemove packages
updateUpdate packages
searchSearch for packages
infoDisplay package info
-yAssume yes

About yum

The `yum` command package manager for RHEL/CentOS 7 and earlier using RPM packages. Package management commands install, update, and remove software on Linux distributions.

Each distribution family has its own package manager — apt for Debian/Ubuntu, yum/dnf for RHEL/Fedora, pacman for Arch, and so on. Understanding your distro's package manager is one of the first steps in Linux administration.

The command accepts 6 commonly used flags shown above, though the full set of options is available in the man page (`man yum`). The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.

Related commands

More Package Management Commands

Other commands in the Package Management category

Related tools