3 Ways to List All Installed Packages in RHEL, CentOS and Fedora

One of the several duties of a system administrator is to install and manage software on a computer system-Linux in this case and in order keep track of installed/available software packages on your system, you can learn, and/or keep in mind a few quick commands.

In this article, we will explain how to list all installed rpm packages on CentOS, RHEL and Fedora distributions using four different ways.

1. Using RPM Package Manager

RPM (RPM Package Manager) formerly known as Red-Hat Package Manager is an open source, low-level package manager, which runs on Red Hat Enterprise Linux (RHEL) as well as other Linux such as CentOS, Fedora and UNIX systems.

You can compare it to DPKG Package Manager, the default packaging system for Debian and it’s derivatives such as Ubuntu, Kali Linux etc.

The following command will print a list of all installed packages on your Linux system, the flag -q meaning query and -a enables listing of all installed packages:

# rpm -qa
List All Installed Packages in CentOS
List All Installed Packages in CentOS

2. Using YUM Package Manager

YUM (Yellowdog Updater, Modified) is an interactive, front-end rpm based, package manager.

You can use the yum command below to list all installed packages on your system, one advantage with this method is, it includes the repository from which a package was installed:

# yum list installed
Yum - List All Installed Packages
Yum – List All Installed Packages

3. Using YUM-Utils

Yum-utils is an assortment of tools and programs for managing yum repositories, installing debug packages, source packages, extended information from repositories and administration.

To install it, run the command below as root, otherwise, use sudo command:

# yum update && yum install yum-utils

Once you have it installed, type the repoquery command below to list all installed packages on your system:

# repoquery -a --installed 
Repoquery - List All Installed Packages
Repoquery – List All Installed Packages

To list installed packages from a particular repository, use the yumdb program in the form below:

# yumdb search from_repo base
List All Installed Packages from Repository
List All Installed Packages from Repository

Read more about package management in Linux:

  1. Linux Package Management with Yum, RPM, Apt, Dpkg, Aptitude and Zypper
  2. 5 Best Linux Package Managers for Linux Newbies
  3. 20 Useful ‘Yum’ Commands for Package Management
  4. 27 ‘DNF’ (Fork of Yum) Commands for RPM Package Management in Fedora

In this article, we showed you how to list all installed packages on CentOS or RHEL four different ways. Share your thoughts concerning this article via the feedback section below.

If you read this far, tweet to the author to show them you care. Tweet a thanks
Aaron Kili
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

3 thoughts on “3 Ways to List All Installed Packages in RHEL, CentOS and Fedora”

  1. Hi. Since the release of Fedora 22, in which DNF became the new default packaging tool and therefore obsoleted yum command on subsequent Fedora OSs, YUM was kept on those Fedora OSs for compatibility reason regarding Linux distributions forked from the Fedora project (Red Hat, Centos) that kept on using YUM, and will be kept for that very reason until they adopt it definitively.

    I had little time before your previous post as reply, to test a command of my investigation that also relies as well on expression ‘wc -l‘ . Such command is likely to cover all current active repositories on a system which is indeed exactly what I was aiming to.

    Here are for comparative purpose the following commands (by the way, there is no need to be executed as user root): ‘dnf list installed|wc -l‘, ‘rpm -qa|wc -l‘ respective outputs: 1619, 1590.

    As noticeable those outputs are incorrect which is no surprise after investigation. Their subsequent commands are inappropriate; they do not reflect exclusively the current active repositories on my system, which in that case are fedora, updates which respectively contain 54 801, 13 085 packages (subsequent results are available from another command too). Good luck though in your hobby.

    Reply
  2. Hi. For Fedora, as output, the number (not the list) of all packages (available and installed) regarding a specific added repository . Regards.

    Reply
    • @Ricky

      You can pipe the output of the above commands to wc utility with the -l switch, to get the number instead of a list of installed packages, like this:

      # yum list installed  | wc -l
      OR
      # rpm -qa | wc -l
      
      Reply

Got something to say? Join the discussion.

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.