YUM (Yellowdog Updater Modified) is one of the most common package managers in Red Hat-based distributions, such as RHEL, Fedora, CentOS, etc. It is built on top of the rpm package manager and provides many features that aren’t available in rpm. Using yum package manager streamlines the process of package installation, dependencies handling, version control, update, uninstallation, etc. ensuring a seamless user experience in Linux/Unix systems. Today I will show you how to use yum command to show all the installed packages in Red Hat-based distributions.
Key Takeaways
- Learning the process of listing all installed app packages in your system.
Requirements
- A Red Hat-based distribution is required.
Process Flow Chart
[Distro Used Throughout the Tutorial: RHEL 9.2]
2 Cases to List Installed Packages Using YUM
YUM package manager is best suited to use in Red Hat-based Linux systems. Listing all installed packages and checking their version is a very important task in package management. YUM-utils is a collection of support utilities for the yum package manager. It provides additional functionalities that complement the capabilities of the yum package manager. In the article, I will guide you to list all installed packages in your system.
If you want to know how to install app packages using yum check this detailed article “How to Install RPM Packages Using YUM” ” To check if an app package is installed in your system using yum check this simple article “How to Check if Package is Installed Using YUM”. For uninstalling an app package using yum check this another detailed article “How to Uninstall a YUM Package”.
Case 01: List All Installed App Packages Using yum
If you want to check all installed packages in your Red Hat-based system using the yum package manager you can follow the following steps:
Steps to Follow >
➊ At first, open the Terminal on your system.
➋ Now, type the following command:
yum list installed
- yum: Package manager in Red Hat-based distributions.
- list: This option can show all available and installed packages in your system.
- installed: Tells the list option to show the installed packages.
➌ After that hit ENTER. All the app packages that are installed in your system will be shown in the terminal. It will look similar to the above image.
➍ If you want to check the total number of packages installed in your system then run the following command:
yum list installed | wc -l
- | (pipe): Pipe is used to redirect the standard output.
- wc: Count the number of lines, words, and characters.
- l: Tells the wc command to count the number of lines.
After running this the number of installed packages will be shown in your terminal like the following image:
➎ Usually listing all installed packages in the terminal clutter the terminal. If you want to avoid that then execute the following command. It will instead list all your installed app packages’ names in a paginated manner in the ‘less’ viewer.
yum list installed | less
- less: Command line pager that allows to view the text output in a paginated manner.
After executing the command the ‘less’ viewer will open with all the installed app packages listed like the previous images.
Case 02: List All the Installed App Packages Using yum-utils
Additionally, in case you want to show all installed packages at once using the yum-utils package which is a support package that enhances the capabilities of the yum package manager, you can follow the below processes:
Steps to Follow >
➊ First, open the Terminal on your system.
➋ Now, run the following command:
yum repoquery -a --installed
- repoquery: yum plugin and a command line tool that queries package information in repositories.
- a: This option specifies that I want to query from all packages in the repository.
- installed: This specifies that we want to query for installed packages.
After that, the terminal will display a list of all the application packages currently installed on your system, similar to the image above.
➌ To determine the total count of installed packages on your system, execute the following command:
yum repoquery -a --installed | wc -l
Upon executing this command, the terminal will display the number of installed packages, like the following image:
➍ It’s common for the terminal to become crowded when listing all installed packages. If you’d like to avoid this, simply execute the given command. The ‘less’ viewer will take care of viewing your installed app packages in a more paginated manner:
yum repoquery -a --installed | less
Upon executing the command, the “less” viewer will open, displaying a list of all the application packages shown in these previous images.
Conclusion
In summary, this article has demonstrated the most straightforward approach to show all installed packages through the yum package manager and its complementary yum-utils tool on a Red Hat-based system. Regardless of whether you utilize RPM, YUM, or DNF any of the package managers in a Red Hat-based system, I hope you will be able to handle efficient package management and maintain an up-to-date Red Hat-based Linux system.