28. June 2022

How to Update CentOS 8 / RHEL 8

By H. Cemre Günay

This guide helps you how to update CentOS 8 / RHEL 8 system to have the latest updated packages or OS minor release on the system as well as to keep the system secure.

First, let’s look at what are the updates waiting for your system by:

yum check-update

The following updates are available for my machine:

If you are satisfied with the updates, proceed to install the updates on your system. As a first task, we will only update the OS kernel package. Use the below command to update the OS kernel:

Updating kernel separately is an optional one as you can update both kernel and packages in a single command which will see in the next section.

Since CentOS / Red Hat doesn’t follow any scheduled date for releasing updates, you will not get Kernel updates every time.
yum update -y kernel

I have a freshly installed CentOS 8, so there is nothing to do for my VM:

Now, install the remaining updates for your system related to already installed applications:

yum update

Same like in the Kernel Update, I do not need any more packages:

But if there are update packages you will get the list of packages along with its download size. You need to type Y and press Enter to begin the update. Once the package updates are downloaded, the installer will automatically start installing it. You may need to accept the GPG signing key if it prompts.

Wait for some time to get the system update complete. Once the packages are installed, reboot your machine

reboot

Then use the check-update command to see if any updates are pending for installation:

yum check-update

Should not return any output. You can also very that the system is booted with the updated kernel using the below command:

uname -a
#Output
Linux cos8.irgnet.wtf 4.18.0-80.11.2.el8_0.x86_64 #1 SMP Tue Jun 28 19:50:19 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

And that’s it from this Tutorial, if you have any questions, please use the comment section. 🙂