How to update software on VPS Linux

Maintaining the software today is one of the first and most important things you should do after getting a VPS. Many critical vulnerabilities fixed by that time become available, so if you do not frequently update the software, then your server is at great risk during operation. In this tutorial, we will show you how to update the system software on your Linux VPS running CentOS or Ubuntu as the operating system.

The process of updating the system software is quite simple and only takes a few minutes of your time. To update the system software on the server, you need to connect to the server via SSH. If you don’t know how to do this, we have a written tutorial on how to connect to a Linux VPS over SSH, so you can follow the steps in this tutorial. After connecting to the server, you can proceed with the steps described below.

The first thing you need to do is determine if there are updates for the packages installed on the server.

If you have a CentOS VPS, run the following command:

# yum check-update

If you have an Ubuntu VPS, run the following command:

# apt-get update && apt-get -s upgrade

The commands above will list the packages that can be updated and you can choose whether to update an individual package or update all packages installed on your server.

How to upgrade all packages with one command:

If you have a CentOS VPS, run the following command:

# yum update

You will be prompted to confirm downloading the update. Click y and then Enter and the update procedure will start.

If you have an Ubuntu VPS, run the following command:

# apt-get update && apt-get upgrade

Your system will ask you to confirm the update. Click, y and then Enter and the update procedure will start.

Depending on the number and size of packages to be updated, the update process can take from a few seconds to several minutes. After the update process is complete, your software and system will be up to date. Keep in mind that you need to do this often if you want your system to contain the latest critical vulnerability fixes as well as important bug fixes. For peace of mind, you can enable automatic updates (optional, but recommended) so you don’t have to manually check for updates. Enabling automatic updates will save you quite a lot of time and keep your VPS safe and up to date.

Sidebar