FUNDAMENTALS A Complete Guide for Beginners
To work effectively in Linux systems, an RPM Package file must contain files, metadata, and the versions of the package. You can update, uninstall, install, or manage software packages in Red Hat-based distributions like Fedora, RhEL, and CentOS by using YUM (Yellowdog Updater Modified) package manager. However, if you want to use yum to remove a specific version, read this article. Here, I’ll show you 2 easy methods of using the YUM to uninstall a particular version of a package. I’ll also go through how to upgrade and downgrade a package’s version in Red Hat Linux.
Process flow chart to remove a specific version using YUM:
[Distro Used Throughout the Tutorial: RHEL 9.2]
2 Practical Methods of Removing Specific Versions of a Package with YUM in Linux
Perhaps you want to remove the older version of any package to install a new one, to do this, you need to know how to remove the specific version with yum. Here, I will describe to you 2 quick methods to complete your task efficiently.
Method 01: Removing Specific Version Using YUM
YUM is the most popular package manager that people use to install, remove or upgrade any packages in Red-hat-based Linux. To remove the specific version of any package by using this package manager, stick to the following instructions:
Steps to Follow >
➊ Open the Red-hat terminal.
➋ Find the specific version to remove it by writing this command:
sudo yum --showduplicates list google-chrome-stable
- sudo: Provides administrative privileges.
- yum: Manages packages in Red-hat-based Linux.
- — showduplicates: shows all versions files of a package.
- list: Lists all the files.
- google-chrome-stable: Package name.
➌ Run this command to remove the older version of the google chrome package:
sudo yum remove google-chrome-stable-107.0.5304.110-1.x86_64
- remove: Removes packages in Linux.
- google-chrome-stable-107.0.5304.110-1.x86_64: Package name with the specific version and architecture.
Method 02: Removing Specific Version Using Next Generation YUM (dnf)
dnf (Dandified YUM) is the most recent version of the YUM package manager. It has evolved into a front-end package manager in the Linux operating system because it performs better and is a great dependency resolver. With this package manager, you can remove the specific version easily. Just follow the next steps:
Steps to Follow >
➊ Open the Red-hat terminal.
➋ Run this code to find the specific version to remove:
sudo dnf --showduplicates list google-chrome-stable
- dnf: Advanced version of yum package manager, used to manage packages in Red-hat-based Linux.
➌ Write the following command to remove version 107.0.5304.110-1 of the google chrome package:
sudo dnf remove google-chrome-stable-107.0.5304.110-1
- google-chrome-stable-107.0.5304.110-1: Package name with a specific version.
Comparative Analysis of Methods to Remove a Specific Version Using YUM
To help you find the appropriate method, I am describing a comparative analysis of the two discussed methods:
Methods | Pros | Cons |
---|---|---|
Method 1 |
|
|
Method 2 |
|
|
I think this table helps you find your right choice. You can take my tips also. Choose method 2 as it has some additional benefits. However, if your system doesn’t support dnf, go for method 1.
Problem With Writing Version Name
Writing the version name correctly is crucial to specify the package to remove. If you write the version name wrongly, it will show no match for the argument.Therefore, the proper syntax of the writing version name should be maintained to avoid this unwanted error.Follow the syntax carefully to overcome the error.
How to Upgrade and Downgrade to a Specific Version Using Yum
Sometimes you need to upgrade the version of the installed packages to avail all the additional features of the latest one. In order to do this, you don’t need to remove the old version of the packages and then again install the latest version. This single command is enough for the work to be done:
sudo yum upgrade google-chrome-stable
- upgrade: Upgrades an older version package to a newer version.
Additionally, if you need the previous version of the google chrome package back, install the version by writing this command, it will automatically downgrade the version:
sudo yum install chrome_107_x86_64.rpm
- chrome_107_x86_64.rpm: Google Chrome old version rpm package.
Conclusion
I hope you can remove the specific version of any package in Linux. In this article, I have explained 2 methods for removing a particular version of the google chrome software package. By following the steps, you can remove any package version according to your preferences. In addition, I have covered how to upgrade and downgrade package versions in Linux systems. Carefully follow each step to do your task successfully. Good Luck!
People Also Ask
Related Articles
- How to Uninstall RPM in Linux [2 Simple Cases]
- How to Uninstall a YUM Package [2 User-Friendly Cases]
- How to Force Remove a Package Without Dependencies Using Yum [2 Methods]
- How to Remove and Purge a Package Using apt-get [4 Methods]
- How to Remove Apt-key in Linux [3 Practical Methods]
- How to Remove Package and Dependencies Using dpkg [4 Cases]
<< Go Back to Uninstall Packages in Linux | Package Management in Linux | Learn Linux Basics