In Red Hat Enterprise Linux (RHEL), to maintain the delegate balance between system-wide updates and targeted precision, performing update operations is crucial. Apart from the standard practice of updating all packages, there are scenarios where you may be required to update specific packages to address compatibility issues and access specific features. In Red Hat-based Linux distros, the powerful package management tool, Yum (Yellowdog Updater, Modified) owns the power to update individual packages. This piece of writing explores the method for updating specific packages on your system.
- Learning the yum update command’s versatility to update packages.
- Knowing the importance of updating specific packages on RHEL.
- You need a system that supports yum like RHEL, CentOS, or Fedora.
- To run the command, you must have administrative privilege (root Privilege).
The Basic of YUM Update
Before diving into the process of updating specific packages, let’s take a moment to briefly revisit the fundamentals of the yum update command. When you execute the ‘yum update’ command, the package manager searches the repositories on your system and compares the available package versions with the currently installed versions on your system.
After querying the repositories, the command provides a list of updates available for the packages and asks you whether you want to proceed or not. You can use the yum update command to update a single package, multiple packages, and all the packages.
Why to Update a Specific Package
At times, you might come across situations involving compatibility challenges, the need for distinct features from a specific version, or the necessity to return to a previous version owing to stability considerations. Instead of updating all packages and potentially causing disruptions to your system, updating a specific package to a desired version can offer a more controlled approach.
2 Cases of Updating a Specific Package in RHEL
As I’ve already mentioned, sometimes you might encounter the necessity to update a specific package or update a package to a specific version. In that case, you can undoubtedly use the yum update command and follow the two cases depicted below.
Case 01: Update a Specific Package
It’s so simple and one command approach to achieve an update for a specific package using yum on RHEL.
Steps to Follow >
➊ Open the terminal on your RHEL.
➋ Run the following command.
sudo yum update firefox.x86_64
➌ Enter the user password to prove identity. You can see here that ‘firefox’ has an available update version of size 107M which is 102.14.0-2.el9_2 and Yum has found it in the mentioned repository.
➍ Press ‘Y’ to continue the update process. Here, I got the updated version of firefox.x86_64 package using the yum update command.
Case 02: Update a Package to a Specific Version in RHEL
Sometimes you may be required to update a package of your system to one of its specific versions to get some features of that version or have a stable environment. To achieve this you have to follow the steps mentioned below.
Steps to Follow >
➊ Open the terminal in RHEL.
➋ Run the following command.
sudo yum list dbus --showduplicates
➌ Enter the user password to get the list. Here, you can notice that the output of the command shows the currently installed version of the package ‘dbus’ and also provides a list of all the available versions of the package.
➍ Now, run the following command to update ‘dbus’ to the specific version.
sudo yum update dbus-1:1.12.20-7.el9_2.1
➎ Enter the user password as directed. Here, the command shows the information on the specified update version, its size, and the repository. A text also appears asking for confirmation to proceed with the operation.
➏ Press ‘Y’ to continue the update process. Here, you can notice that the package named ‘dbus’ has been successfully updated to the specific version of the command which is ‘1:1.12.20-7.el9_2.1’.
In summary, YUM provides a versatile way to handle package updates, letting you concentrate on particular packages and desired versions. You can ensure a stable and secure Linux system, by using the power of yum to update specific packages to specific versions according to your needs. Hope this article quenched your thirst for knowledge on the process of updating a specific package using YUM elaborately with great significance.
People Also Ask
- A Complete Overview of sudo apt update Command in Linux
- [Fixed] sudo apt update Not Working Error in Ubuntu
- [Fixed] sudo apt-get update Not Working in Ubuntu
- [Fixed] APT-Get Update Failed to Fetch Error in Linux
- How to Update RPM Packages in RHEL? [6 Methods]
- How to Check Updates Using YUM on RHEL? [5 Practical Cases]
- How to Update All Packages in RHEL Using YUM? [3 Cases]