yum is an interactive package manager based on rpm packages.

Configuration Files

  • /etc/yum.conf
  • /etc/yum/repos.d/*.repo

Repository Options

Option Description
repositoryid Unique repository name.
name Repository name.
baseurl Repository path directory.
enabled Use the repository or not.
gpgcheck Perform a GPG signature check or not.
gpgkey A url pointing to the repository gpg key.
enablegroups Whether package groups are allowed.
failovermethod Random by default.
cost The cost of accessing the repository, which defaults to 1000.

Variables

Variable Description
$releasever Package release version.
$arch System architecture.
$basesearch System’s base architecture.
$uuid unique and persistent uuid.
$YUM0-$YUM9 Shell environment variable name.

Example

[repositoryid] name=Repository name baseurl=url:repository url enabled=1 or 0 gpgkey=url gpgcheck=1 or 0 enablegroups=1 or 0 failovermethod=roundrobin or priority, default is roundrobin cost=1000 by default

Usage

1
yum [option] [command] [package ...]

Options

Option Description
-y or ‑‑assumeyes Suppose all the answers are yes.
-q or ‑‑quiet Run but do not output messages.
-v or ‑‑verbose Run and show debug information.
‑‑enablerepo=repoidglob Enable disabled repository with id or glob.
‑‑disablerepo=repoidglob Disable enabled repository with id or glob.
‑‑noplugins Run and disable all plug-ins.

Commands

Command Description
install Install a package or a set of packages.
update Upgrade the specified package to the latest version, and upgrade all packages without specifying a package.
check-update Show packages that need to be updated.
remove or erase Delete or erase packages.
list Show available packages.
provides or whatprovides Find packages that provide corresponding functionality.
search Find packages by summary, name, description, and address.
info Show the description and summary information of the available packages.
clean Clean the yum cache directory.
makecache Use to download and make available all metadata for the currently enabled yum repos.
groupinstall Install all packages in a group.
groupupdate Install or update all packages in a group.
grouplist Lists the available groups for all yum repositories.
groupremove Delete all packages in a group.
groupinfo Lists the description of all the packages in a group.
localinstall Install a set of local rpm files.
localupdate Upgrade the system by specifying local rpm files.
reinstall Reinstall the same version package.
downgrade Downgrade the package from the current version to the previous highest version.
deplist Generate a list of all dependencies and which packages provide them for a given package.
repolist Generate a list of configuration repositories. List all enabled repositories by default.
history yum operation histories.

References yum, yum.conf(5)

Buy me a coffeeBuy me a coffee