Searching for installed RPM packages

Updated , First Published by Pete Freitag

Suppose you want to search the rpm's installed on a linux server that uses rpm (the Redhat Package Manager). I find the easiest way to query is by doing something like this:

rpm -qa | grep httpd

The -qa will list all installed rpm's, then we can pipe a grep to search the list.

More about Grep

Grep is a pretty handy command to know on RedHat Linux (or Amazon Linux, or CentOS or whatever you are using). You can perform an Inverted / Negative grep search to find lines that do not match. You can count files by extension using grep. You can also do a case insensitive grep search if you need to. Grep is one of the most useful linux commands to know!