YUM (Yellowdog Updater Modified) serves as a vital command-line package management tool utilized in Red Hat-based distributions such as RHEL, Fedora, and CentOS. It simplifies package management within Linux/Unix systems, streamlining processes for easy installation, updates, and uninstallation. The task of verifying package installations holds great significance in package management. The YUM package manager seamlessly accomplishes this task. In this article, I will guide you through how to check if an app package is installed using the yum command in Red Hat-based distributions.
- Learning about how to check if an app package is installed.
- A Red Hat-based distribution is required.
Process Flow Chart
[Distro Used Throughout the Tutorial: RHEL 9.2]
2 Methods to Check if a Package is Installed Using YUM
After you install an app package, you need to ensure that the app is installed properly. Using the yum package manager and its different options is a hassle-free process. In this article, I will guide you through the step-by-step process of checking an installed app using yum.
If you want to know how to install app packages using yum check this detailed article on “How to Install RPM Packages Using YUM”. To list all installed app packages using yum check this simple article “How to Show List of Installed Packages Using YUM”.
Method 1: Check an App Package Using the LIST Option
You can use the list option of the yum command to check if an app package is installed. The list option is very useful for checking all available and installed app packages in your system using the Command Line Interface (CLI). You can check an installed app directly or you can check it from all installed app packages list.
Case 1: Check for an App Package Directly
If you want to directly check if an app package is installed in your Red Hat-based system using the yum list command, then follow this simple step:
Step to Follow >
➊ First open your terminal and run the following command to check for an installed app package:
yum list installed audacity
If the app package you are checking is installed, the results similar to the image above will appear on your terminal.
Case 2: Check for an App Package From All Installed Packages List
You can also check if an app package is installed properly from the list of all installed app packages. In order to do that execute these straightforward tasks:
Step to Follow >
➊ To begin with type the following command in your terminal:
yum list installed | grep audacity
➋ Now, hit ENTER. If the package is installed properly in your system your terminal will look like the following image:
Method 2: Check an App Package Using the INFO Option
In Red Hat-based distribution the info option of the yum package manager is very useful. You can use this command to check details about installed app packages in your Linux system. Moreover, it is possible to examine details of packages not yet installed but available for installation from remote repositories. To verify the installation of a particular package, follow these simple steps:
Step to Follow >
➊ First of all open your terminal and run the following command to check if an app package is installed in your system:
yum info audacity
Now, if that specific app is installed in your system, the detailed info section will indicate it as “Installed Packages“.
Comparative Analysis of Methods
Now, take a look at the following comparison table that illustrates the two discussed methods of using the yum command to check the installation status of an app package in Red Hat-based Linux distributions:
|Method 1||Case 1||Direct and precise result.||Need exact package name.|
|Case 2||Do not need the exact package name.||Can show a false positive response with a similar app package name.|
|Method 2||Case 1||Show comprehensive information about package details.||Additional details may be overwhelming for a simple binary check.|
Out of all these commands, Case 1 of Method 1 is the most efficient way to check whether a package is installed or not. If you don’t remember the exact name of the app package then use method 1’s case-2. If you also want to check package details then go for method 2.
What Happens if the Package is Not Installed
If the specific app package is not installed in your system, the terminal output will differ from the image demonstrated in the methods above. You will get different responses in those cases. If you are using the yum list command to check for the installed app package then you will see the response shown in the following image:
But, when you use the yum info command to check the package’s installation status, the response will resemble the following image:
In this article, I have discussed how using different options of the yum package manager you can easily check if a specific app package is installed in your Red Hat-based system. I hope this article will be helpful for you to maintain an up-to-date Linux system.