How to List Installed RPMs



How to List Installed RPMs

The rpm -qa command lists all the packages installed on your system:

     [root@bigboy tmp]# rpm -qa
     perl-Storable-1.0.14-15
     smpeg-gtv-0.4.4-9
     e2fsprogs-1.27-9
     libstdc++-3.2-7
     audiofile-0.2.3-3
     ...
     ...
     ...
     [root@bigboy tmp]#

You can also pipe the output of this command through the grep command if you are interested in only a specific package. In this example we are looking for all packages containing the string ssh in the name, regardless of case (-i means ignore case).

     [root@bigboy tmp]# rpm -qa | grep -i ssh
     openssh-server-3.4p1-2
     openssh-clients-3.4p1-2
     openssh-askpass-gnome-3.4p1-2
     openssh-3.4p1-2
     openssh-askpass-3.4p1-2
     [root@bigboy tmp]#

Note

You could use the rpm -q package-name command to find an installed package because it is much faster than using grep and the -qa switch, but you have to have an exact package match. If you are not sure of the package name and its capitalization, the latter method is probably more suitable.