Yum Package Manager Cheat Sheet

A quick list of the most useful and common commands for the yum package manager.

Yum Package Manager Cheat Sheet

This Yum cheat sheet provides you with a quick and easy overview of all major Yum package manager commands and their respective functionality. Although it does not cover all the corners of the package manager, it provides with the most useful tools.

Install, uninstall & upgrade packages

Command Functionality Example command
install Install a package from yum repository sudo yum install nginx
remove Remove an installed package and its dependencies from the system sudo yum remove nginx
erase Similar to remove command sudo yum erase nginx
update Update or or more packages on the system sudo yum update or sudo yum update gcc
update-to Update or or more packages to a specific version sudo yum update-to ngingx-2.7-1.1
upgrade update all packages to the latest version sudo yum upgrade
reinstall Reinstall current version of a specific package sudo yum reinstall httpd
autoremove Remove a package and all other unnecessary packages sudo yum autoremove httpd
downgrade Downgrade a specific package to an earlier version sudo yum downgrade nginx
swap Remove package and install another sudo yum swap nginx httpd
localinstall Install a package from a local repository sudo yum localinstall
groupinstall Install packages from a specific group sudo yum groupinstall "group name"

Base Package Commands

Command Functionality Example
list List package names from repositories sudo yum list all
info Show information about a specific package sudo yum info nginx
search Search for a package name and description sudo yum search apache
updateinfo Show information about available package updates sudo yum updateinfo baseos
check-update Show available package updates from enabled repositories sudo yum check-update
grouplist Show names and available package groups sudo yum grouplist
deplist Show dependencies for a specific package sudo yum deplist vsftpd
provides Locate the package that provides a specific file sudo yum provides "*/bin/zsh"
groupinfo Show description and contents of a package group sudo yum groupinfo "group name"
help Display yum help information or help on sub command sudo yum help or sudo yum help list

Managing Yum Repos

Command Functionality Example
repolist List the available software repositories sudo yum repolist
repo-pkgs Use packages in a specific repository sudo yum repo-pkgs baseos list
repoinfo Show information about enabled repositories sudo yum repoinfo baseos
makecache Download repository data to cache sudo yum makecache

Troubleshooting Yum

Command Functionality Example
clean Clean out all cached package data/clean all packages metadata sudo yum clean packages or sudo yum clean all
check Check local RPM db for problems sudo yum check
history View and use yum transactions sudo yum history list or sudo yum history undo or sudo yum history redo
fssnapshot Show LVM snapshots sudo yum fs filters

Helpful Options

Command Option Functionality Example
-y Assume yes if prompted sudo yum -y install nginx
--assumeno Assume no if prompted sudo yum --assumeno install nginx
-v Verbose sudo yum -v install
-q Quiet sudo yum -q install
--noplugins Do not load any YUM plugins sudo yum --noplugins install
--disableplugin= Deactivate a specific plugin sudo yum --disableplugin=ps
--enableplugin= Activate a specific plugin sudo yum --enableplugin=ps
--changelogs Show changelog info of a package sudo yum --changelogs install httpd
---filter=?? Filter output for specific vendors, groups, architectures, and others. sudo yum list available --filter=server
--enablerepo= Enable a deactivated repo sudo yum install nginx --enablerepo=??
--disablerepo= Disable an activated repo sudo yum install nginx --deactivaterepo=??
--downloadonly Download package and no install sudo yum install --downloadonly httpd

Extra Commands

Commands Functionality Example
reposync Synchronize yum repo to local directory sudo yum reposync -r baseos
show-installed Show installed packages
verifytree Check local repo for consistency
yumdb Change yum database
yumdownloader download a package from repo to cwd
repouery Query remote repo and local db
repoclosure Get unmet dependency list
needs-restarting Show processes that have been updated and requires restart


This cheat sheet covers major Yum commands and how to use them. To learn more, use the yum manual pages wit the command:

man yum

You can download this cheat sheet in the resource below:

If you enjoy our content, please consider buying us a coffee to support our work:

Table of Contents
Great! Next, complete checkout for full access to GeekBits.
Welcome back! You've successfully signed in.
You've successfully subscribed to GeekBits.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info has been updated.
Your billing was not updated.