How to install server updates

This article describes how to install updates on an unmanaged server. Maintaining an up-to-date server with the latest patches and fixes is one of the most important things you can do to make your server more secure.

Follow the appropriate procedures below for your server's operating system.

The information in this article only applies to the products listed in the Article Details sidebar. You must have root access to the server to follow the procedures described below.

CentOS and Fedora

To download and install the latest updates immediately, type the following command as the root user:

yum update

The previous command runs in interactive mode, which means you are asked at certain points during the update process whether or not you want to continue. To install updates without any user intervention, type the following command instead:

yum -y update
You can add this command to a cron job to automatically update your server at specific intervals.

Debian and Ubuntu

To search the repositories for updates and then install them immediately, type the following command as the root user:

apt-get update && apt-get upgrade

The previous command runs in interactive mode, which means you are asked at certain points during the update process whether or not you want to continue. To install updates without any user intervention, type the following command instead:

apt-get -y update && apt-get -y upgrade
You can add this command to a cron job to automatically update your server at specific intervals.

Other Linux distributions

For other Linux distributions, consult its documentation for the steps to install updates.

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.