How to Show List of Installed Packages Using YUM?[2 Cases]

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 RedHat-based distributions.

Process flow chart to show the list of installed packages using YUM:

Step by step process use the YUM package manager to show all installed packages in a Red Hat-based distribution using the command line interface (CLI)

[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:

  1. At first, open the Terminal on your system.
  2. 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.

    list all installed packages using yum list command

  3. 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.

  4. 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:

    number of packages installed in your system

  5. 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.

    show all installed app packages in less viewer

    all installed packages are shown in less viewer in a paginated format

    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:

  1. First of all, open the Terminal on your system.

  2. 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.

    show all installed packages using yum-utils tool

    After that, the terminal will display a list of all the application packages currently installed on your system, similar to the image above.

  3. 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:

    number of app packages installed in my system

  4. 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

    show installed packages in less viewer

    all installed packages' name in less viewer

    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


<< Go Back to Package Installation in Linux | Package Management in Linux | Learn Linux Basics

4.8/5 - (13 votes)
LINUX
FUNDAMENTALS
A Complete Guide for Beginners Enroll Course Now
icon linux
Ridoy Chandra Shil

Hello everyone. I am Ridoy Chandra Shil, currently working as a Linux Content Developer Executive at SOFTEKO. I am a Biomedical Engineering graduate from Bangladesh University of Engineering and Technology. I am a science and tech enthusiast. In my free time, I read articles about new tech and watch documentaries on science-related topics. I am also a big fan of “The Big Bang Theory”. Read Full Bio

2 thoughts on “How to Show List of Installed Packages Using YUM?[2 Cases]”

  1. 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 ?

    Reply

Leave a Comment