Article overview

Help article

Updating Debian 9

Debian uses packages that are included in repositories to manage the updates and upgrades of your Debian installation / installed software. In this article, we show you how to update all packages on your Debian 9 VPS, update specific software, and update your entire OS to a newer version.

  • Connect to your VPS via SSH, or the VPS console before executing the commands below, and follow the steps as root user or use sudo
     
  • Restart your VPS after updating the kernel. Changes are often not processed until your server is restarted.

Updating all software / packages

 

With the command below, you update & upgrade all software on your VPS. This is a two-part process:

  • update: Update the list of available packages and versions thereof on your VPS. This is not done automatically by your OS and is therefore important to be able to install new software.
  • upgrade: Installs available updates of installed packages.
apt -y update && apt -y upgrade

-y confirms that this process may make changes to your VPS. Alternatively, you can also run these commands separately, i.e.:

apt -y update
apt -y upgrade

Updating specific software / packages

 

Would you rather update a specific package instead of all packages? Then, use the command:

apt -y update && apt -y upgrade packagenaam

Replace 'package name' with the name of the relevant package. In our article 'Installing software in Debian 9', we explain how to find out the name of packages.


Upgrading Debian 9

 

Check the installed version of Debian 9 with the command:

lsb_release -a

On Debian's website, under 'News', you will find the announcements of available update numbers (the Debian Wiki is regularly lagging behind, unfortunately).

Suppose you want to upgrade Debian 9.6 to 9.7, then use the commands below.

apt -y update && apt -y dist-upgrade

or

apt -y update
apt -y dist-upgrade

The difference with the previous commands is that 'dist-upgrade' also adjusts dependencies in addition to the regular upgrade. Suppose a conflict occurs, an important package is then updated at the expense of less important packages.

This process is not entirely without risk and it is therefore important to restart your VPS after executing these commands to exclude whether problems have arisen, and if so, to restore one of the automatic backups of your VPS.


 

 

Should you have any questions left regarding this article, do not hesitate to contact our support department. You can reach them via the ‘ContactUs’ button at the bottom of this page.

If you want to discuss this article with other users, please leave a message under 'Comments'.

Has this article been helpful?

Create an account or log in to leave a rating.

Comments

Create an account or log in to be able to leave a comment.