yum

YUM Cheatsheet #

yum is a package management utility for RPM-based Linux distributions that helps in managing packages and repositories.

Basic Commands #

Command/OptionExampleDescription
yum install <package>yum install httpdInstall a package
yum remove <package>yum remove httpdRemove a package
yum updateyum updateUpdate all installed packages
yum update <package>yum update httpdUpdate a specific package
yum upgradeyum upgradeUpgrade all installed packages
yum listyum listList available and installed packages
yum list installedyum list installedList installed packages
yum list availableyum list availableList available packages from enabled repositories

Package Search and Info #

Command/OptionExampleDescription
yum search <package>yum search httpdSearch for packages by name or description
yum info <package>yum info httpdDisplay detailed information about a package
yum whatprovides <file>yum whatprovides /usr/sbin/httpdFind the package that provides a specific file

Repository Management #

Command/OptionExampleDescription
yum repolistyum repolistList all enabled repositories
yum-config-manager --add-repo <repo_url>yum-config-manager --add-repo http://example.com/repoAdd a new repository
yum-config-manager --disable <repo_id>yum-config-manager --disable myrepoDisable a repository
yum-config-manager --enable <repo_id>yum-config-manager --enable myrepoEnable a repository

Cleaning and Caching #

Command/OptionExampleDescription
yum clean allyum clean allRemove all cached files from enabled repositories
yum clean packagesyum clean packagesRemove cached package files
yum clean metadatayum clean metadataRemove cached repository metadata

Transaction and History #

Command/OptionExampleDescription
yum historyyum historyList the transaction history
yum history info <transaction_id>yum history info 3Display detailed information about a specific transaction
yum history undo <transaction_id>yum history undo 3Undo a specific transaction

Miscellaneous #

Command/OptionExampleDescription
yum deplist <package>yum deplist httpdDisplay the dependency list for a package
yum localinstall <package.rpm>yum localinstall httpd-2.4.6-93.el7.centos.x86_64.rpmInstall a package from a local RPM file

This cheatsheet covers essential yum commands and options for package management on RPM-based Linux distributions.

yum

Explore our comprehensive cheatsheets to enhance your knowledge and efficiency. Each cheatsheet provides detailed command options, examples, and descriptions to help you master various tools and technologies.