Linux rpm List Installed Packages Command

How do I list all installed packages using rpm command on CentOS/Suse/Fedora/RHEL/Scientific and Red Hat Enterprise Linux? Can you tell me the Linux command to list all rpm’s installed on the server?

The rpm command is a powerful package manager. It is used to build, install, query, verify, update, and erase individual software packages on RPM based distro such as OpenSUSE, RHEL or CentOS. The latest version of Red hat and friends recommend using the yum command or dnf command.
Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements rpm
Est. reading time 2m
. This page explains how to list or count onstalled RPM packages on Linux operating systems.

Linux rpm list installed packages command syntax

The rpm command has -a option to query (list) all installed packages.

List all installed packages using rpm -a option

Open the Terminal or login to the remote server using ssh client. Type the following command as root user:
# rpm -qa
Sample outputs:


One can list installation date too as follows:
rpm -qa --qf '(%{INSTALLTIME:date}): %{NAME}-%{VERSION}\n
Sample outputs:

(Tuesday 17 September 2019 11:54:48 PM IST): python-jinja2-2.7.2
(Saturday 27 January 2018 08:46:16 PM IST): python-markupsafe-0.11
(Tuesday 17 September 2019 11:53:12 PM IST): nss-pem-1.0.3
(Tuesday 17 September 2019 11:54:50 PM IST): neon-0.30.0
(Tuesday 17 September 2019 11:53:12 PM IST): rpm-python-4.11.3
(Friday 21 September 2018 05:10:19 AM IST): python34-msgpack-0.5.6
(Tuesday 17 September 2019 11:54:50 PM IST): iwl6000-firmware-
(Tuesday 17 September 2019 11:53:13 PM IST): make-3.82
(Wednesday 29 November 2017 12:57:00 AM IST): gettext-
(Sunday 25 June 2017 07:08:26 PM IST): ppp-2.4.5
(Tuesday 17 September 2019 11:54:51 PM IST): iwl1000-firmware-
(Tuesday 17 September 2019 11:53:14 PM IST): libgfortran-4.8.5
(Sunday 02 July 2017 02:11:41 AM IST): mtools-4.0.18
(Wednesday 05 December 2018 06:54:19 AM IST): radvd-2.17
(Sunday 25 June 2017 07:08:28 PM IST): alsa-firmware-1.0.28
(Tuesday 17 September 2019 11:54:53 PM IST): libgcc-4.8.5
(Thursday 10 May 2018 02:10:20 PM IST): opus-1.0.2
(Tuesday 17 September 2019 11:53:17 PM IST): passwd-0.79
(Tuesday 17 September 2019 11:54:56 PM IST): rdma-core-22.1

Getting info about specific packages

You can display more information about package using the following command:
# rpm -qi iptables
Sample outputs:

Name        : iptables                     Relocations: /usr 
Version     : 1.3.5                             Vendor: Red Hat, Inc.
Release     : 1.2.1                         Build Date: Thu 13 Jul 2006 07:17:24 PM CDT
Install Date: Tue 10 Jul 2007 08:49:20 AM CDT      Build Host:
Group       : System Environment/Base       Source RPM: iptables-1.3.5-1.2.1.src.rpm
Size        : 676805                           License: GPL
Signature   : DSA/SHA1, Thu 18 Jan 2007 09:47:22 AM CST, Key ID 5326810137017186
Packager    : Red Hat, Inc. 
URL         :
Summary     : Tools for managing Linux kernel packet filtering capabilities.
Description :
The iptables utility controls the network packet filtering code in the
Linux kernel. If you need to set up firewalls and/or IP masquerading,
you should install this package.

List all files installed by the RPM package

You can list package files using the following command:
# rpm -ql iptables
Sample outputs:


Feel free to add pager such as less or more to display output one screen at a time:
# rpm -qa | less
# rpm -qa | more
# rpm -qa | grep 'something'
# rpm -ql iptables | more

Want to find out the installation date of a specific package, for example nginx, run:
# rpm -q --last nginx
package nginx is not installed
# rpm -q --last ufw
ufw-0.35-9.el7.noarch Thursday 21 June 2018 11:33:26 PM IST

List installed RPM packages using yum or dnf on Linux

Run the following as the root user (use the grep command or more command as pager/filters):
# yum list installed
# yum list installed | more
# yum list installed | grep nginx

For Fedora and latest version of the CentOS/RHEL 8.x use the dnf command # dnf list installed
# dnf list installed | less
# dnf list installed | grep -i mysql

Count all installed RPM packages using yum/dnf in Linux

Pass the yum command output to the wc command to count installed packages on CentOS or RHEL or SUSE:
# yum list installed | wc -l
# dnf list installed | wc -l

List all installed packages in RHEL, CentOS, Oracle and Fedora Linux

Another option is to type the following rpmquery command. However, first install dnf-utils/yum-utils package:
# dnf install dnf-utils ## <-- Fedora latest or CentOS/RHEL 8x. -- ##
# yum install yum-utils ## <-- CentOS/RHEL 6.x/7.x -- ##

Next, type the following command:
# repoquery -a --installed
# repoquery -a --installed | grep httpd
# repoquery -a --installed | more

It is also possible to list installed packages from a particular repo such as epel repo on CentOS/RHEL 7 or ELEP repo on RHEL 8 or EPEL repo on CentOS 8. First, get the repo id, run:
# yum repolist
Sample outputs:

Loaded plugins: changelog, copr
repo id                          repo name                                             status
base/7/x86_64                    CentOS-7 - Base                                       10,097
epel/x86_64                      Extra Packages for Enterprise Linux 7 - x86_64        13,501
extras/7/x86_64                  CentOS-7 - Extras                                        307
ngompa-snapcore-el7/x86_64       Copr repo for snapcore-el7 owned by ngompa                19
updates/7/x86_64                 CentOS-7 - Updates                                     1,010
repolist: 24,934

Note down repo id such as base, epel, extras and so on. Finally list all installed packages from epel repo:
yumdb search from_repo reop_id_here
yumdb search from_repo extras
yumdb search from_repo epel


In this tutorial, you learned how to list all installed rpm packages on CentOS, RHEL (Red Hat Enterprise Linux), SUSE/OpenSUSE and other rpm based distros using rpm and dnf/yum command that print a list of all installed packages on your distro. See rpm man page here.

  • Man pages: yum(8)

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 13 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
13 comments… add one
  • gm Feb 13, 2009 @ 5:30

    Thanks a lot.

    simple and beautiful

  • fsw Sep 18, 2009 @ 20:31

    Merci beaucoup, I was just searching for that option right now!

    And if one has a lot of .rpm, it’s great to pipe it through sort and more, like this:

    rpm -qa | sort -fu | more

    then you got a nice alphabetical list that you don’t need to scroll up and down…

    Greetings from France

    • chetan May 16, 2011 @ 6:21

      thanks a lot …………….

  • shashwat singh Feb 26, 2010 @ 8:16

    hey ol of u’ve written how to list the installed packages, but is there a way to install a new package using rpm???????
    please help me out!!!!!!!!!!

  • aries sulit Nov 21, 2010 @ 1:34

    hi! is it possible to check if my packages are really installed using rpm? thanks in advance!

  • Andrew Nov 6, 2011 @ 10:28

    Hi! ,
    By using these commands I can’t find package which I have installed by other way, par exemple: with ‘make install’.

  • eric Feb 3, 2012 @ 17:25

    Unless you have compiled your own rpm or installed an rpm, you will not see custom built packages in your rpm list.

  • Den Mar 21, 2012 @ 5:50

    Is there a way to list the packages name only without the version number?

  • Den Mar 21, 2012 @ 5:50

    Is there a way to list packages without the version number?

    • Jan Apr 20, 2012 @ 8:51

      rpm -qa –queryformat “%{NAME}\n”

      • KMP Sep 24, 2012 @ 16:05

        formatting problem above
        rpm -qa –queryformat “%{NAME}\n”
        note two hypen characters

  • avoc15082013 Aug 15, 2013 @ 14:49

    number of rpm installed, (just to take a count)

    [oc@150820134 ~]$ rpm -qa | wc -l
    [oc@150820134 ~]$

  • vaibhav kanchan Apr 29, 2016 @ 10:53

    Hi All,

    We can check the whether group packages are installed using yum grouplist | grep “Development Tools” — for example

    Is it possible to find using same using rpm

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum