Yum (Yellow dog Updater, Modified) is an open package manager in Red Hat like systems. It was created to facilitate the process of updating the system, taking into account package interrelationships. Also, Yum searches for RPM packages in repositories, installs them, tracks dependencies between packages, removes unused packages, and downgrades (rolls back a package to a previous version).
By default, the manager is managed through the console, but it is possible to install additional components to work through the graphical interface (PackageKit).
Basic commands*
Common command template for working with Yum:
yum [parameter] [command] [package name]
Installing a package from the repository
The following command is used to install a package into the system:
yum install packageagename
If you want to install more than one package, you have to space them:
yum install package1 package2 ..
As a result of executing these commands, Yum will search for a package with the specified name in the existing repositories, displaying the available version and a list of dependencies that are required for operation.
Installing a package from a .rpm file
If you have downloaded any package to the server as a .rpm file, you can install it using Yum tools with the install command described above. Previously localinstall was used for this purpose. Example:
yum install package.rpm
This will search for package.rpm dependencies and output an offer to install them. In case of a problem with the GPG signature of an RPM package, you can use the option
--nogpgcheck option which allows you to bypass this check and continue installing the package.
Remove package
To remove a package from the system, you can use the remove or erase command:
yum remove packageagename
Search for a package in the repositories
Yum assumes several search options, which are performed by the list, search, provides commands. The list command is the simplest search option. In this case packages are searched by name.
yum list packagename
The search command searches the package name and description. If, for example, you want to find packages that are related to vpn, you should use the command:
yum search vpn
The provides command searches for packages which contain a file with a specified name. If, for example, you want to find packages that contain a client file, you have to use the command:
yum provides client
System update
Updating can be done either for the entire system or for a specific package. For the first case the command is used:
yum update
For the second one:
yum update packagename
Downloading a package without installing it
In order to simply download any package from the repository, you have to use the command:
yumdownloader packageagename
Package dependencies display
To view the dependencies of a package, use the command:
yum deplist packageagename