Home / YUM Command Cheat Sheet

YUM Command Cheat Sheet

TASKDESCRIPTIONCOMMAND

Manage YUM Repository

List enabled repositories on the server.repolist

Manage YUM Repository

Show information about enabled yum repositories.yum repoinfo centos-7-server-rpms

Manage YUM Repository

List packages in a repository.yum repo-pkgs seimaxim-rpms list

Manage YUM Repository

Install all packages in a seimaxim-rpms repository.yum repo-pkgs seimaxim-rpms install

Manage YUM Repository

Remove all packages from seimaxim-rpms repository.yum repo-pkgs seimaxim-rpms remove

Manage YUM Repository

Download the yum repository data in the cache.makecache

YUM Info

List yum options and commands.yum help

YUM Info

List all available & installed packages.yum list all

YUM Info

List all installed packages.yum list installed

YUM Info

Show all installed and available kernel packages.yum list kernel

YUM Info

Show info of ImageMagick package.yum info ImageMagick

YUM Info

Show package dependency.yum deplist ImageMagick

YUM Info

List package providing the queried file.yum provides "/sbin/adduser"

YUM Info

Search package by name.yum search finger

YUM Info

Show available and installed package groups.yum grouplist

YUM Info

Show contents and description of package groups.yum groupinfo "Web Server"

YUM Info

Show available updates in a repository.yum check-update

Installation, Removal, & Upgrade of Packages

Install the ImageMagick package.yum install vsftpd

Installation, Removal, & Upgrade of Packages

Update all packages installed on the server.yum update
yum -y update

Installation, Removal, & Upgrade of Packages

Update one package installed on the server.yum update httpd

Installation, Removal, & Upgrade of Packages

Upgrade all packages on the server.yum upgrade

Installation, Removal, & Upgrade of Packages

Update only security packages.yum update --security

Installation, Removal, & Upgrade of Packages

Update packages to a specific version.yum update-to

Installation, Removal, & Upgrade of Packages

Upgrade all packages on the server.yum upgrade

Installation, Removal, & Upgrade of Packages

Downgrade a package.yum downgrade vsftpd

Installation, Removal, & Upgrade of Packages

Remove a package (ftp) and install another (vsftpd).yum swap ftp vsftpd

Installation, Removal, & Upgrade of Packages

Erase a package and dependencies.yum remove lftp

Installation, Removal, & Upgrade of Packages

Erase a package and dependencies.yum erase lftp

Installation, Removal, & Upgrade of Packages

Erase a package and packages, not required.yum autoremove vsftpd

Installation, Removal, & Upgrade of Packages

Install all packages in selected group.yum groupinstall "Web Server"

Installation, Removal, & Upgrade of Packages

Install a package from http,ftp, or local file.yum localinstall xyz-2-2.x64.rpm
yum localinstall https://seimaxim-repo/xyz-2-2.x64.rpm

Troubleshoot YUM

Display yum update, install and erase commands.yum history list

Troubleshoot YUM

Display info of yum action 2.yum history info 2

Troubleshoot YUM

Undo yum action in transaction 2.yum history undo 2

Troubleshoot YUM

Redo yum action in transaction 2.yum history redo 2

Troubleshoot YUM

Useful for package updates rollback.yum fssnapshot

Useful YUM Commands

If prompted for install permission, assume no.yum --assumeno

Useful YUM Commands

Produce extra verbose output.yum -v

Useful YUM Commands

No verbose output.yum -q

Useful YUM Commands

Enable disabled repo.yum --enablerepo=
yum install ImageMagick --enablerepo=centos-7-server-rpm

Useful YUM Commands

Disable the enabled repo.yum list available --disablerepo=epel

Useful YUM Commands

Execute command without loading yum plugins.yum --noplugins

Useful YUM Commands

Show changelog details of a package.yum --changelog

Useful YUM Commands

List processes that have been updated and require a restart. Requires yum-utils package.yum needs-restarting

Useful YUM Commands

Show conflicted dependencies from the repository. Requires yum-utils package.yum repoclosure

Useful YUM Commands

Analyze consistency in local yum repository. Requires yum-utils package.yum verifytree

Useful YUM Commands

Complete yum actions that are not yet complete/failed. Requires yum-utils package.yum-complete-transaction

Leave a Reply