yum(8)
yum is a package manager that installs, updates, and removes software packages on Red Hat-based Linux systems.
Synopsis
yum [OPTION]... COMMAND [PACKAGE]...Description
yum (Yellowdog Updater Modified) is the primary package manager for RHEL, CentOS, and Fedora systems. It resolves dependencies automatically and manages RPM packages from configured repositories. Modern systems increasingly use dnf, which is yum's successor with improved performance.
yum maintains a local cache of repository metadata and can install, remove, update, or search packages. It requires root privileges for most operations and reads configuration from /etc/yum.conf and /etc/yum.repos.d/.
Common options
| Flag | What it does |
|---|---|
-y, --assumeyes | assume yes to all prompts; useful for automated scripts |
-q, --quiet | suppress output messages |
-v, --verbose | increase verbosity of output |
--no-cache | do not use cached package data |
--enablerepo=REPO | temporarily enable a disabled repository |
--disablerepo=REPO | temporarily disable an enabled repository |
-x, --exclude=PACKAGE | exclude package from updates or installation |
--cacheonly | use only cached metadata without contacting repositories |
Examples
install the nginx web server package and its dependencies
sudo yum install nginxremove the Apache HTTP server package
sudo yum remove httpdupdate all installed packages to their latest versions
sudo yum updatesearch repositories for packages matching 'vim'
yum search vimdisplay detailed information about the curl package
yum info curlinstall PHP and MySQL PHP extension without prompting
sudo yum install -y php php-mysqlshow all installed kernel packages
yum list installed | grep kernelclear yum's local cache to free disk space
sudo yum clean all