Yellowdog Updater Modified or Yum for short is a package management tool for RPM packages. It is popular in the REHL family of Linux distributions including CentOS and Fedora… Thus, you can think of yum as the bootstrap for the RPM package manager.
Like popular package managers, Yum works through repositories containing rpm-formatted collections of tools.
For this quick overview, we will discuss the basics of yum and show the available packages on the system using yum as the package manager.
Yum List of available packages
To show the available packages, we can use the yum list command as shown below:
sudo yum list available
This command will display the name of all available packages, the latest version, and the repositories to which they belong.
Installed packages Yum Check
Yum is incredibly easy to use; like most package managers, it allows you to pass intuitive parameters. For example, to show a list of installed packages, we can use the command:
sudo yum installed
Similar to displaying available packages, the above command will show the installed packages name, version and source package repository.
You can pipe the output of the above command to tools like grep, less, etc.
Specific Yum Search Package
An example of using the yum list command is to check if you have a particular package installed. For example, let’s see if awk is installed.
sudo yum list installed | grep ‘awk'
The above command pipes the output of the yum list to grep, which then looks for a specific line, in this case awk.
As you can see, we have awk installed (as part of gawk) and the python-Hawkey package.
Show available packages from a specific repo
You can also filter the available package in a specific repository. We can start by listing all the included repositories using the command:
sudo yum repolist
This will list all available repositories on the system.
To search for packages that are only available in a specific repo. For example, in the epel repository we use the command:
список sudo yum доступен | grep epel
Conclusion
In this short article, we took a look at yum and showed the available and installed packages on the system.