What is Yum?

YUM Stands for Yellowdog Updater Modified. YUM is an interactive, rpm-based package manager. Yum is available in different Linux OS Like Redhat, Centos, Fedora, etc. It can also perform installation of new packages, removal of old packages, and perform queries on the installed and/or available packages among many other commands/services.

Yum Solves the Package dependencies problems which are generally found in RPM Command.

Syntax:

# yum [options] [command] [package ...]

Example 1: Install a Package

In the above command, to install Thunderbird we have to press Y for confirmation, so to avoid this we can pass the ‘y’ option in the yum command so that it automatically confirm and install the package.

# yum -y install thunderbird

Example 2: Remove a Package

Example 3: Check weather any updates are available for your system

Below Command will list no of the packages to be updated:

To update a particular package to a specific version, use ‘update-to’ option in the yum command.

Example 4: To display information about a specific package

To List the information about available packages, example:

Example 5: Search packages when we know something about the package but aren’t sure of its name

Example 6: To find out which package provides a specific file like ‘/etc/inittab’

Example 7: To install all the packages of specific group

To install all packages of ‘Development tools’ :

# yum groupinstall 'Development tools'

To list all the available groups from all yum repos.

Example 8: To view history of a package install

To view the history of a package – what had happened in the past (yum transactions) like when it was installed, upgraded, and removed, use the below command:

Syntax:

# yum history [info/list/packages-list/packages-info/summary] package-Name

Example 9: View and Install security updates

Fo this, we need to first install the security plugin using the below yum command:

# yum install yum-security

To list all Available Security Updates: