In the ongoing arena of software and technology, installing and updating packages are the most indispensable tasks to accomplish for the proper functionality, stability, and security of Linux operating systems. The yum check-update command proves to be a valuable utility within Linux systems that employ the YUM (Yellowdog Updater, Modified) package manager. Yum is typically present in Red Hat-derived distributions such as CentOS, and Fedora. The functionality of the yum check-update command includes enabling users to collect information about possible package updates.
Key Takeaways
- Getting a comprehensive outlook about the yum check-update.
- Interacting with real scenarios of checking updates using the command.
- Analyzing the detailed information of the packages from the output of the command.
Requirements
- You need to have YUM installed on your Linux system.
- To run the command, you need to have administrative privilege (root privilege).
What is YUM?
YUM (Yellowdog Updater, Modified) is an open source front end to rpm package management utility for Red Hat-based distros that handles the functions of installing, updating, and managing software packages of the Linux system. It makes the environment friendly and safer for the user by Performing dependency resolution while installing, updating, and removing software packages. Yum package manager helps us to retrieve information about accessible repositories and fetch package repos.
Understanding the yum check-update Command
The Yum check-update command serves as a valuable tool in the Linux system. It allows users to gather information about available package updates without actually performing the updates. Here you can see the functionality of the yum check-update command below:
- Checking for Updates: The Yum package manager searches the repositories for the available new versions for all the installed packages on Red Hat-based distros.
- Information Gathering: The command gathers details information about the repositories, which helps you to identify the source of the updates. It also provides information about dependencies.
- Output: The command shows the output as a list of available updates of the packages on your system including details information about those updates, packages, repositories, dependencies,
- Non-destructive: The yum check-update command is a non-interactive operation that doesn’t make any changes to your system like the yum update
- Safety Precaution: It helps to identify critical security updates necessary for your system maintenance.
When you run the sudo yum check-update command, yum checks the package repositories on your system to find any updates available there for the installed packages. After that, the command outputs a list of the updates available for the packages.
5 Cases of Using the ‘yum check-update’ Command
You can use the yum check-update command to get information about available updates for the packages on your system. You can use this command to check updates for a single package, multiple packages, or a filtered update information list according to your required keyword.
Case 01: List All Available Updates in Red Hat
Sometimes it’s necessary to get the list of available updates for the installed packages on your system to keep your software updated, secure, and functioning optimally. To check all available updates in the list you can simply use the yum check-update command if you are the root user or you have to add sudo in the front of the command to get the root privilege as follows.
Steps to Follow >
➊ Open the command terminal in RedHat.
➋ Run the command to get the list of available update packages.
sudo yum check-update
- sudo: Provides the privilege to perform the administrative command.
- yum: This command line tool allows interaction with the yum package management system in RHEL.
- check-update: This subcommand tells yum to perform a listing of available updates for the installed packages on the system.
➌ Enter the password and you will get a list of the updates available for the packages of your RHEL system.
Each line of the output contains information about the package updates. Here is an example, of the analysis of the highlighted line from the list:
- dbus: It’s the package name.
- x86_64: It is the installed version of the package.
- 1:1.12.20-7.el9_2.1: this is the current up-to-date version of the package.
- rhel-9-for-x86_64-baseos-rpms: It’s the repository where the package update is available.
Case 02: Check Updates for a Specific Package
In case of necessity, you can also check available information on updates for a specific package.
Steps to Follow >
➊ Open the command terminal in RHEL.
➋ Run the following command with a package name you want to check.
sudo yum check-update Firefox
- sudo: In case, you are not a root user, you need to use sudo to get the root privilege.
- yum: This command line tool allows interaction with the yum package management system in RHEL.
- check-update: This subcommand tells yum to perform a listing of available updates for the installed packages on the system.
- Firefox: It’s the package name you want to get information about. You can use any of your necessary package names.
➌ Enter your user password and you will get the information about the specified package. Here you can see the information on Firefox in the highlighted line of the output including its installed version, available update version, and the repository where you can find the updated version.
Case 03: Check Updates for Multiple Packages
Whenever you need to query a couple of packages for their available updates, you can undoubtedly use the yum check-update command by stacking all the package names after the command.
Steps to Follow >
➊ Open the command terminal on your RHEL.
➋ Run the following command accordingly.
sudo yum check-update <package1>, <package2>, <package3….>
Please replace <package1>, <package2>, etc with the real package name as you need.
➌ Enter the user password to proceed with the action. You can see the output list of the three packages mentioned in the command with their details information about the available update packages in the displayed repository.
Case 04: Check Kernel Updates with YUM
To check for kernel updates, you can use the yum check-update command and get the information that you need.
Steps to Follow >
➊ At first, open the command terminal on your RHEL system.
➋ Now, run the following command to get the information about the kernel.
sudo yum check-update kernel
- sudo: Gives you the root privilege to perform the action.
- yum: This package management tool actually waits for the next argument to accomplish the instruction regarding packages on Red Hat-based distros.
- check-update: Tells yum to check the repositories for newer updates for the packages.
- kernel: Narrows down the searching volume for the command focusing only on the kernel package and finds the available updates for the kernel.
➌ Enter your user password and you will get the information about your kernel. As there is no newer version available for kernel in my system, the command shows the above message.
Case 05: Displaying Specific Update Information
If you need to filter out information on available updates of packages from the long list, you can use the sudo yum check-update command with a specific keyword. Then pipe the command with the grep command.
Steps to Follow>
➊ Open the command terminal in RHEL.
➋ Run the following command with a keyword for which you want to filter out the updates list.
sudo yum check-update | grep -i <keyword>
- sudo: Permits you to have access like a root user.
- yum: Allows interaction with the yum package management system in RHEL.
- check-update: Tells yum to perform a listing of available updates for the installed packages on the system.
- Piping sign ‘I’: Pipelines the sudo yum check-update command to the next command.
- grep: Filters the list according to the keyword mentioned in the command and displays the lines which only contain the keyword.
- -i: Makes the filtration process case insensitive while matching with the keyword ‘dbus’.
- dbus: Is the keyword (here a package name) by which the filtering process will be directed.
➌ Enter your user password and you will get the list of information that includes the keyword dbus. Here you can see that the output shows a list of lines of the keyword ‘dbus’. Any line that contains the keyword ‘dbus’ among the available update list, is listed here.
Conclusion
In this article, I’ve given an elaborate overview of the yum check-update command with almost five applications on the Red Hat Enterprise Linux (RHEL) operating system. It shows the functionality of the command and its impact of it to keep the system’s health safe and secure. Hope this article has given you a clear and smooth understanding of the sudo yum check-update command.
People Also Ask
Related Articles
- 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 Update All Packages in RHEL Using YUM? [3 Cases]
- How to Update a Specific Package in RHEL Using YUM? [2 Cases]
<< Go Back to Update Packages in Linux | Package Management in Linux | Learn Linux Basics