How to update CentOS 8

When you manage a CentOS 8 server, it is important that you always ensure that the security and software updates have been carried out. This is because servers with the most recent updates are less likely to be victims of cybercrime. For example, hacks and vulnerabilities are a lot less common with servers that have the most recent software.

Before updating your CentOS 8 server, it is important to make an externally stored backup. Having an external backup (not on your CentOS 8 server) comes in handy when your server has errors or crashes. In such cases it is no longer possible to access your backup. If you do not have an externally stored backup, it could mean that you have lost all of your data.

In addition to an externally stored backup, you need SSH access to update your CentOS 8 server. You can use putty on Windows for this. Do you have Mac or Linux? Then you can use the terminal.

Check if you’re using CentOS 8

After you’ve logged in, we have to check if you’re indeed running CentOS 8. To know which version of CentOS you are using, you can use the following command:

cat /etc/redhat-release

If you’re running CentOS 8, you should get the following result:

CentOS Linux release 8.X

If you got this result, we know that you’re running the correct CentOS version and we can continue with step 2.

Step 2: Clear cache

Before updating your CentOS server, it’s really important that you empty all the caches and have the most recent repos (software servers and lists). You can use the following command to do this:

yum clean all -y

After you’ve cleared the cache, it’s time to update CentOS.

Step 3: Update your CentOS 8 server

When updating CentOS, you can choose to use the recommended settings or you can determine which settings are used yourself.

If you want to use the recommended settings, you can run the following command:

yum update -y

Do you prefer deciding which settings are used in the update? Then you can omit -y. The command then looks as follows:

yum update

When the update is done successfully, the only thing left to do is a server reboot. After the server reboot you’ll be sure that everything went well and that the update has been completed properly. You can use the following command to perform a reboot:


Do you have questions about updating CentOS or need help? We are more than happy to help you! Do not hesitate to contact us click here

Also check out our other posts on topics such as “the best ways to secure your server”, “how to create an external backup server” and a lot more! Click here

Share this with someone who'd like to read this

Recent Posts

How to update DirectAdmin

Updating DirectAdmin is necessary to ensure that your system has the most recent security updates. If you have an unmanaged VPS or dedicated server, you will probably

Read More

How to update AlmaLinux

Like any other distribution, it’s important to update your AlmaLinux system. By keeping your AlmaLinux system up to date, you will be sure to have the latest

Read More