Skip to content

Instantly share code, notes, and snippets.

@kslimani
Created September 5, 2019 08:35
Show Gist options
  • Save kslimani/550992b90571e5887f03b1d1f4116c95 to your computer and use it in GitHub Desktop.
Save kslimani/550992b90571e5887f03b1d1f4116c95 to your computer and use it in GitHub Desktop.
Linux Debian Buster upgrade procedure

Linux Debian Buster upgrade procedure

Starting a Screen Session

Start a screen session is recommended to ensure that the updates will continue to install in the unlikely event you are disconnected during the upgrade process.

Install screen package :

apt install screen

After installation has completed, start a screen session :

screen

If you are disconnected from your server, you can reconnect to the screen session by entering the following command :

screen -Dr

Backup

Before upgrading your system, it is strongly recommended that you make a full backup, or at least back up any data or configuration information you can't afford to lose.

Stop services

It is recommanded to stop some services like Apache, MySQL, Nginx, etc... Some services can also be disabled & re-enabled after upgrade.

Configure packages list to buster

Edit /etc/apt/sources.list file (adapt to your needs) :

deb http://ftp.fr.debian.org/debian/ buster main non-free contrib
deb-src http://ftp.fr.debian.org/debian/ buster main non-free contrib

deb http://security.debian.org/ buster/updates main non-free contrib
deb-src http://security.debian.org/ buster/updates main non-free contrib

# buster-updates, previously known as 'volatile'
deb http://ftp.fr.debian.org/debian/ buster-updates main non-free contrib
deb-src http://ftp.fr.debian.org/debian/ buster-updates main non-free contrib

Upgrade to Buster

apt update
apt upgrade
apt full-upgrade

Remove deprecated packages

apt autoremove

(OPTIONAL) check package status

dpkg --audit
dpkg --get-selections | grep hold

Some packages may require to be MANUALLY reinstalled or removed if deprecated/conflicted.

(OPTIONAL) make text boot the default under systemd

systemctl set-default multi-user.target

Note: to restore GUI boot

systemctl set-default graphical.target

Finally, reboot server

reboot

After reboot, services previously disabled can be re-enabled (if any).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment