RPM which stands for Red Hat Package Manager is a package management system used primarily by Red Hat-based distributions, such as RHEL, Fedora, CentOS, etc. It allows users to easily install, update and uninstall .rpm software packages on their Unix/Linux system. Other package managers like YUM and DNF are also very common in Red Hat-based distributions. Today I will show you how to list the installed packages using RPM in Red Hat-based distributions.
Key Takeaways
- Checking the installed packages in Red Hat-based distributions.
Requirements
- You need to have a Red Hat-based distribution.
- You need access to the terminal.
Process Flow Chart
[Distro Used Throughout the Tutorial: RHEL 9.2]
2 Cases to List Installed Packages Using RPM
RPM package manager is best suited to use in Red Hat-based Linux systems. It can streamline your package management experience. If you want to know how to install an app package using rpm check this amazing article “How to Install Local Package Using RPM”. For uninstalling an app package using rpm check this another detailed article “How to Uninstall Package Using RPM”. RPM supports queries with different types of options. Using these queries you can check the installed app and its details.
Case 01: Check an Installed App Using RPM
In case you want to check if one particular app is installed in your Red Hat-based system you can follow the following step to check the package name or even app package details:
Steps to Follow >
➊ At first, open the Terminal on your system.
➋ Now, type the following command:
rpm -q vim-enhanced
- rpm: Manages rpm packages in Red Hat-based distributions.
- q: Query command to retrieve information using rpm command.
- vim-enhanced: Name of the app package I am checking.
➌ After that hit ENTER. If the app is installed it will be shown in the terminal. It will look similar to the image below.
➍ Or if you want to check an installed app with details run the following command:
rpm -qi vim-enhanced
- i: Provides more detailed info about a specific app package.
Your terminal should look like the above image. You can see that the -qi option gives you more detailed information about the installed app package.
Case 02: Check All the Installed App Using RPM
Additionally, if you want to check all installed rpm packages at once you can run the following command to see all of your installed packages altogether:
Steps to Follow >
➊ open the Terminal on your system.
➋ Now, type the following command:
rpm -qa
- a: it makes a query to show all installed app packages.
➌ After that hit ENTER. All installed rpm packages will be shown in the terminal like the above image.
Conclusion
This article checked the easiest way by which you can check the installed package in a Red Hat-based system. I hope whether you use RPM, YUM, DNF, or any other package manager in a Red Hat-based system, you will be able to handle RPM software packages and manage an up-to-date Linux system.