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.
Use the command sudo yum list installed
to check or show installed RPM packages with yum. Today I will show you how to use yum command to show all the installed packages in detail in RedHat-based distributions.
Process flow chart to show the list of installed packages using YUM:
[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 RedHat.
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:
- At first, open the Terminal on your system.
- Now, type the following command:
yum list installed
EXPLANATION- 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
EXPLANATION- | (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
EXPLANATION- 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:
-
First of all, open the Terminal on your system.
-
Now, run the following command:
yum repoquery -a --installed
EXPLANATION- 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.
People Also Ask
How do I list installed packages in Linux?
To list all installed packages in Linux, apt list --installed
is used in Debian-based Linux, dnf list installed
is used in Red Hat-based distribution, and for Arch Linux pacman -Q
is used.
How to check available packages in Linux using yum?
To check all the available packages you can install from remote repositories using the yum package manager run the sudo yum list available
command.
How can you check if a package is installed?
When it comes to determining package installation status, the method varies based on the Linux distribution and package manager in use. In Debian-based systems, apt list --installed package_name
command, in Red Hat-based distributions dnf list installed package_name
command, and for Arch Linux the pacman -Q package_name
command is used to identify whether a package is installed or not.
Where are packages located in Linux?
To check the location of an installed app package in any Linux/Unix-based operating system, use which package_name
or whereis package_name
command. Which command will display the path of the first occurrence of the command found in the PATH variable. Whereis command will display the path of the binary, source, and manual page files of the app package.
Related Articles
- How to Install Specific Version of a Package Using YUM
- How to Install Local Package Using YUM [2 Practical Cases]
- How to List Installed Packages Using RPM [2 Practical Cases]
- 3 Ways to Install Pacman Package Manager in Ubuntu
- How to Install Local Package Using RPM [A Quick Guide]
- How to Install RPM Packages Using DNF [4 Useful Cases]
- How to Install Local Package Using DNF [2 Practical Cases]
- 2 Ways to Install Group Packages Using DNF [With Cases]
- 5 Ways to List Installed Packages in RHEL Using DNF With Cases
- How to Install RPM Packages From Text File [5 Simple Cases]
<< Go Back to Package Installation in Linux | Package Management in Linux | Learn Linux Basics
FUNDAMENTALS A Complete Guide for Beginners
Sorry to say, but before _yum_ saw the light of this planet you simple did a:
“`
rpm -qa
“`
How do you _search_ for a package with yum and how do you _see_ if it is installed ?
Hello Chris, I hope you’re having a good day.
Ah, the good old days of RPM! However, nowadays, YUM is recommended over RPM for package management. You can explore this article, where I have shown how to use RPM to list installed packages.
To search for a package using YUM, just use the simple
yum search package_name
command.Since there are more options with YUM, in this particular article, I have demonstrated how to list all installed packages using YUM. And follow this article to check if a specific app package is installed using YUM.
Let me know if you have any other questions!