≡ Menu

Linux rpm List Installed Packages

How do I list all installed packages using rpm command on CentOS/Suse/Fedora/RHEL/Scientific and Red Hat Enterprise Linux?

The rpm command is a powerful Package Manager, which can be used to build, install, query, verify, update, and erase individual software packages. The latest version of Red hat and friends recommend using the yum command.

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


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: ls20-bc2-14.build.redhat.com
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         : http://www.netfilter.org/
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.

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

See also
Share this tutorial on:

Your support makes a big difference:
I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft, takes a lot of my time and hard work to produce. If you use nixCraft, who likes it, helps me with donations:
Become a Supporter →    Make a contribution via Paypal/Bitcoin →   

Don't Miss Any Linux and Unix Tips

Get nixCraft in your inbox. It's free:

{ 13 comments… add one }
  • gm February 13, 2009, 5:30 am

    Thanks a lot.

    simple and beautiful

  • fsw September 18, 2009, 8:31 pm

    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 am

      thanks a lot …………….

  • shashwat singh February 26, 2010, 8:16 am

    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 November 21, 2010, 1:34 am

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

  • Andrew November 6, 2011, 10:28 am

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

  • eric February 3, 2012, 5:25 pm

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

  • Den March 21, 2012, 5:50 am

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

  • Den March 21, 2012, 5:50 am

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

    • Jan April 20, 2012, 8:51 am

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

      • KMP September 24, 2012, 4:05 pm

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

  • avoc15082013 August 15, 2013, 2:49 pm

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

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

  • vaibhav kanchan April 29, 2016, 10:53 am

    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 Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: , , , , , ,