Searching for installed RPM packages
Updated on November 07, 2024
By Pete Freitag
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!
Searching for installed RPM packages was first published on December 14, 2005.
If you like reading about redhat, rpm, or linux then you might also like:
- Building Apache2 From Source on Linux (Redhat 8)
- Creating a Symbolic Link with ln -s What Comes First?
- Upgrading to Java 7 on Linux