It is a better practice to keep your system’s packages up to date so that you can have the latest features and security updates in time. As we all know, the Red Hat Enterprise releases a new version of CentOS every year, and with the passage of time and rapid growth of software updates, we must have to update our CentOS Operating system.

The update process varies based on the Operating system version, and in this article, we will learn how to update and upgrade CentOS 8 Operating system. The CentOS 8 Operating system uses the DNF package manager. Before CentOS 8, the default package manager was YUM, so if you are using some older version of CentOS, you can replace the dnf with yum. All the commands in this article would work perfectly fine for the older version of the CentOS Operating System.

We will learn to update and upgrade the whole Operating system as well as the individual package using both command line and GUI methods, so without any further ado, let’s begin with the updating process.

Update the CentOS 8 system using the terminal

Updating the system through the terminal is the most convenient method.

Step 1: Update the DNF package repository

First of all, downloading and caching the metadata for all known repositories, it is better to make the DNF package manager more resource-aware by updating the DNF package repository cache using the command:

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/Update-Upgrade-CentOS-8-01.png" data-lazy- height="245" src="data:image/svg xml,” width=”974″>

Step 2: Check the updates

Now, in order to check the updates available for all the installed packages, type the command given below:

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/Update-Upgrade-CentOS-8-02.png" data-lazy- height="81" src="data:image/svg xml,” width=”974″>

If there are any updates available, the above-given command’s execution will list all the available updates of the whole Operating system’s packages.

Step 3: Update all the packages

To update the whole Operating system’s packages, we can simply type any of the two given commands below:

$ sudo dnf update


// or


$ sudo dnf upgrade

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/Update-Upgrade-CentOS-8-03.png" data-lazy- height="156" src="data:image/svg xml,” width=”974″>

Both of the above two commands given work the same in the CentOS Operating system.

Update an individual application

If you want to update a single package instead of the whole Operating system’s packages, you can specify the name of the package. For example, for updating the “httpd” package, type the command given below:

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/Update-Upgrade-CentOS-8-04.png" data-lazy- height="154" src="data:image/svg xml,” width=”974″>

This is it; you have learned to update and upgrade the CentOS 8 Operating System using the terminal. Let’s see how to update and upgrade the CentOS 8 Operating system through GUI.

Update the CentOS 8 system using the GUI method

To update the software from the GUI, you can simply go to the activities and click on the software application icon in the activities tray:

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/Update-Upgrade-CentOS-8-05.png" data-lazy- height="1093" src="data:image/svg xml,” width=”412″>

In the Software application, switch to the “Updates” tab and click on the refresh button in the top left corner of the software application window.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/Update-Upgrade-CentOS-8-06.png" data-lazy- height="514" src="data:image/svg xml,” width=”974″>

It starts to look for new updates, and it would take a while.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/Update-Upgrade-CentOS-8-07.png" data-lazy- height="516" src="data:image/svg xml,” width=”974″>

If there will be any updates available, they will be shown in the “Updates” tab, and you can download and install the updates available for applications.

Otherwise, it will show a “Software is up to date” message if there is no update available.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/Update-Upgrade-CentOS-8-08.png" data-lazy- height="512" src="data:image/svg xml,” width=”974″>

This is how you can upgrade the packages of CentOS8 through the GUI.

Conclusion

This post has learned to update and upgrade the CentOS 8 Operating system using the terminal and GUI method. Updating the system is as important as securing the system because without updating the latest packages, it may lead to a buggy application or a vulnerability in the application.

About the author

<img alt="Shehroz Azam" data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/7011409B3A384F43A8417D1DAC68D179-150×150.jpg604cedb6677d2.jpg" height="112" src="data:image/svg xml,” width=”112″>

Shehroz Azam

A Javascript Developer & Linux enthusiast with 4 years of industrial experience and proven know-how to combine creative and usability viewpoints resulting in world-class web applications. I have experience working with Vue, React & Node.js & currently working on article writing and video creation.