Lets take a look at basic yum commands so we can list packages, repositories and also install update packages.
Installing and updating
Lets take a look at installing wget package. -y switch specifies that we answer Y to run install
yum -y install wget
To update package
yum -y update wget
To update or install group of packages
yum -y group install "System Management" yum -y group update "System Management"
To view header information for the package or group
yum info wget "package" yum group info "package group"
In some cases we need to check for package updates
To remove package
yum remove -y "package"
Listing and searching for available packages
List all installed packages
yum list installed
List packages available for installation
yum list available
To see if the package is installed or available
yum list wget
To list all installed that begin with wg*…
yum list installed wg*
To list recently added packages
yum list recent
List summary of available groups
yum groups summary
List all groups available for installation
yum group list
Search for packages with specific file
yum provides "filename"
Find available packages from specific repository. In this example we will use demolocal repo we created before
yum --disablerepo="*" --enablerepo="demolocal" list available
To view information from history database
yum history list yum history list all