How to List All Installed RPM Packages in Linux

bash, command-line, linux

This article will show you to how to list of all installed RPM packages on Linux distributions like Ubuntu, CentOS, RHEL, and Fedora. We’ll show you how to solve this using the rpm and dpkg commands.

RPM (Red Hat Package Manager) is used by distributions such as CentOS, RHEL, and Fedora for package management. Ubuntu, on the other hand, uses a different package management system, dpkg, and doesn’t natively use RPM packages. However, it’s still possible to list RPM packages in Ubuntu.

Here are examples for each distribution:

List all installed RPMs in CentOS, RHEL, and Fedora

RPM is native to these distributions. Use the rpm command with the -qa option to list all installed packages:

$ rpm -qa

The output will be a list of all installed RPM packages, along with their versions:

httpd-2.4.6-93.el7.centos.x86_64
openssl-1.0.2k-19.el7.x86_64

List all installed packages in Ubuntu

As mentioned, Ubuntu uses a different package management system, dpkg, and its front-end apt. To list all installed packages in Ubuntu, you’d typically use:

$ dpkg --list

If you’ve installed any RPM packages using a tool like Alien, you can list these using the same rpm command as above. First, ensure that RPM is installed:

$ sudo apt-get install rpm

Then use the rpm command to list installed packages:

$ rpm -qa

Remember, this will only list RPM packages installed via a tool like Alien, not the .deb packages typically used in Ubuntu.

See also  Linux - How to disable 'Last Login' welcome message

Leave a Comment