In the ever-evolving world of Linux systems, package management is a core responsibility in guaranteeing the stability, security, and peak efficiency of the system. Out of different package managers, Yum (Yellowdog Updater, Modified) stands out as a potent utility frequently employed in Linux distribution based on Red Hat, like RHEL, CentOS, and Fedora. One of the crucial characteristics involves the capability to simultaneously update all installed packages, ensuring that your system stays current and fortified against potential vulnerabilities.
- Getting introduced to the Yum package manager.
- Knowing the functions of the yum update command regarding updating packages in RHEL.
- Being familiar with three aspects of the command in terms of performing updates.
- You need a system that supports yum like RHEL, CentOS, or RHEL.
- To run the command, you must have administrative privilege (root Privilege).
What is YUM?
YUM (Yellowdog Updater, Modified) is a package management utility used in Red Hat-based Linux distributions. It simplifies software installation, updates, and management by resolving dependencies and providing a user-friendly interface to interact with software repositories and packages.
Understanding the ‘yum update’ Command
When you execute the ‘yum update command’, the package manager starts to locate up-to-date versions of the installed packages by scanning the system’s configured repositories. After that, it provides a list of available updates and information about each update, such as the package name, version, size, and a brief description. Yum update command takes the following steps to update all packages:
- Repository Scanning.
- Generating an Update List.
- User Decision.
- Updating Packages.
The Necessity of Updating All Packages
- Security: It’s so common to identify software vulnerabilities in your system over time. Updates of the packages contain patches to fix these vulnerabilities. That’s why you update packages to ensure a protected system against potential security. breaches.
- Stability: Updates very often include bug fixes that address issues and improve the strength and health of your system.
- System Performance: Updates may contain performance optimizations that make the software faster and more efficient, which can result in a better user experience.
- Feature Enhancement: Updates can also add new features and functionalities to enhance your experience with the software.
3 Cases of Updating All Packages Using YUM
It’s pretty convenient and easier for the user to update all the installed packages on RHEL using yum as it provides flexibility and versatility to operate according to the user’s requirements. To elaborate, there are instances where you might want to update all packages, while at other times, you might choose to exclude specific ones from the update process.
In this section, you’ll get an insight into this concept through the examination of three cases of package updates including two interesting examples.
Case 01: Update All Packages Using Yum
The most basic act of every Linux user is to update all the existing packages of his system to keep a healthy environment. It’s just a single command needed to accomplish the operation stated below.
Steps to Follow >
➊ At first, Open a terminal on your RHEL system.
➋ Now, run the following command to update and enter the user password as directed in the image.
sudo yum update
➌ Now, Type Y to continue the update process for the enlisted packages. After the process is finished, you will get a list of the packages with the latest upgraded versions. Here, you can see the list and a ‘complete!’ message that assures the accomplishment of the updating operation.
Case 02: Update Packages, Excluding a Few
Sometimes you may require to update your system but you want to keep some of the packages at their current version for your convenience. In simple terms, you want to avoid updating them. In that case, you can use the yum update command here also with an extended option that is –exclude or -x.
To give you a practical overview, I’ll discuss a few examples for your better understanding. To make it more clear, I’ve checked updates for the packages that have available newer update versions using the following command.
sudo yum check-update
Example 01: Update All Packages Excluding a Single Package
To avoid a single package, while updating all packages in your system you can simply run the following command:
sudo yum update -x=firefox*
After running the command, enter your user password. Immediately you’ll get the list of the packages without Firefox. Now, type Y as you’ve done above to continue the update process. Here, you can see a list of updatable packages but the list doesn’t contain the ‘firefox’ package anymore. You can compare this list with the previous list of all packages.
Example 02: Update All Packages Excluding Multiple Packages
In case of necessity, you can also exclude multiple packages while updating. You can implement the operation using the command yum update with the additional exclude or x option as many packages you want to exclude. You can use the option multiple times to exclude as many packages as you need. In my case, I’ve run the following command:
sudo yum update -x=firefox* -x=dbus*
This command will require you a password to authenticate your identity. So, enter the user password to run the operation.
Here, the packages that match the name firefox and dbus, are avoided while updating. You’ll understand it more clearly if you compare the list with the all-packages list for an update. Now, just type Y as directed to continue the update process and you will get an updated system with those packages in their older version.
Case 03: Update Only Security-Related Packages
Whenever you need to update your systems’ security-related packages just run the following command, it will update all the security packages within a while.
sudo yum update --security
Here, you can see in the package list that only security-related packages are enlisted. You can compare the package list with the first package list of all packages for updates.
The yum update command is crucial for effective Linux system management. It maintains the package current ensuring security, stability, and improved performance. Whether you are experienced or new, mastering YUM update is essential for skilled system management.
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 a Specific Package in RHEL Using YUM? [2 Cases]