FUNDAMENTALS A Complete Guide for Beginners
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.
What is YUM?
YUM (Yellowdog Updater, Modified) is an open source front end to rpm package management utility for Red Hat 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 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, and 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:
- Open the command terminal.
- Run the command to get the list of available package updates:
sudo yum check-update
EXPLANATION- 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.OUTPUT ANALYSIS
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 by following the steps below:
- Open the command terminal in RHEL.
- Run the following command with a package name you want to check:
sudo yum check-update Firefox
EXPLANATION- 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 use the yum check-update
command by stacking all the package names after the command. Here’s a step-by-step guide to check updates for multiple packages:
- 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 by following the steps below:
- 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
EXPLANATION- yum: This package management tool 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. Here’s how:
- 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>
EXPLANATION- 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
What does yum check-update command do in Linux?
The yum check-update
command checks whether any updates exist for packages including package versions that are already installed on your system repositories without applying them and aiding the informed decision-making on system maintenance.
How to check updates on RHEL?
To check any updates available on RHEL, utilize the yum package manager by running the command yum check-update
in the terminal. This helps to list all the package updates from all repositories if any are available.
What is the difference between the yum update and the yum check-update command?
The command yum update
installs available updates for currently installed packages. Performing a direct update, it also displays a summary of the package updation. On the other hand, the yum check-update
command only checks for any available updates without installing them.
How to install available package updates using the Yum package manager?
To install the available package updates using the Yum package manager, open the terminal and type the command yum update
. Upon pressing ENTER, it will upgrade all the system software and their dependencies to the latest available version to keep the system up-to-date.
Does yum update the kernel?
The yum package manager consistently installs a new kernel rather than replacing the existing one, risking a potentially unbootable system.
What is the yum list in Linux?
The yum list
command lists all the available packages in all enabled repositories and all the installed packages on your system.
What is yum clean all?
The yum clean all
command reduces the storage of your system by removing unnecessary cached package files from your system.
Related Articles
- A Complete Overview of sudo apt update Command in Linux
- An Ultimate Guide of “sudo apt-get 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
Great article! I was struggling to check for updates on my RHEL server, but this post really helped me understand the yum command better. The practical cases at the end were especially helpful in clarifying how to use yum in different scenarios.