- Command Reference

This site is command references for system engineers.

User Tools

Site Tools

Top     OS ( Linux )     Middleware     Protocol     Hardware     Programming ( Shell Script )     SiteMap


Top     SiteMap




Linux Command#Software

How to use yum Command in RHEL/CentOS


Commands List

Command Objective Example
yum -h
yum clean all Clean all cached files from any enabled repository.

Repository Setting

Command Objective
yum repolist ← only enable repository
yum repolist all
Check Repository
yum-config-manager Check Configuration
yum-config-manager --enable REPO_NAME Enable Reposigory
yum-config-manager --disable-repo REPO_NAME Disable repository
yum-config-manager --add-repo REPO_URL Add Repository

Searching Packages

Command Objective Example
yum search STRINGS Find any packages matching a string yum search mysql
yum search apache
yum provides LIBRARY yum provides
yum whatprovides XXXXX yum whatprovides
yum info PACAGE yum info lxc
yum deplist PACAGE check the dependences of the packages yum deplist vnc-server
yum deplist tree
yum check-update Checks whether updates exist for packages that are already installed on your system.
yum list Lists all packages that are available in all enabled repositories and all packages that are installed on your system.
You can confirm all rpm version.
yum list available
yum list extras
yum list installed It lists all the packages installed on the system.
You can confirm rpm version.
yum list installed |grep openssh
rpm -qa --last | less
← How to check installed packege order by installed date
yum list updates It lists the packages you can update
You can confirm rpm version.
yum list updates |grep openssh

Install, Remove, Update Packages

Command Objective Example
yum install PACKAGE
yum -y install PACKAGE
yum localinstall XXXX.rpm
yum remove PACKAGE
yum update ← update all packages
yum update PACKAGE ← update only a package
yum upgrade upgrade is the same as the update command with the --obsoletes flag set.

Yum Groups

Command Objective Example
yum grouplist Lists installed groups and groups
yum groupinfo "GROUPNAME" Displays detailed information about a group.
yum groupinstall "GROUPNAME" Installs all the packages in a group. yum groupinstall "X Window System"
yum groupinstall "GNOME Desktop Environment"
yum groupremove "GROUPNAME" Removes all the packages in a group.
yum groupupdate "GROUPNAME" Updates all the packages in a group.


Command Objective Example
yum history list all
yum history info N
yum history list all
yum history info 8


How to Use Proxy


export http_proxy=


export http_proxy=

Check Reposistory in all repo files

# grep -E "\[*\]|name|baseurl" /etc/yum.repos.d/*.repo

How to use only the specific repository

# yum --disablerepo=* --enablerepo=test-repo repolist
# yum --disablerepo=* --enablerepo=remi,epel search httpd

os/linux/command/yum.html.txt · Last modified: 2017/07/14 by admin