Search Our Database

Upgrading from Debian 10 to Debian 11

Last updated on |

Introduction

Upgrading from Debian 10 (buster) to Debian 11 (bullseye) ensures your system benefits from the latest features, security updates, and improvements. This guide will walk you through the process, from updating your current system packages to performing the full upgrade and rebooting your server.

 

Prerequisites

  • SSH access to your Debian server with a user that has sudo privileges.
  • A stable internet connection for downloading necessary packages.
  • Backup of important data and configurations.

 

Step-by-Step Guide

Step 1: Update Existing Server Packages

1. SSH to your server as a regular user with sudo privileges.

2. Update your existing server packages to ensure compatibility with Debian 11:

sudo apt update
sudo apt upgrade -y

Remove unnecessary dependency files:

sudo apt autoremove

 

 

Step 2: Change the Debian Sources

1. Confirm the Debian 10 codename by running:

lsb_release -a

Expected output:

2. Back up your sources list and related configurations:

sudo cp /etc/apt/sources.list ~/sources.bak
sudo cp -r /etc/apt/sources.list.d/ ~/sources.list.d.bak

3. Open the sources list file in an editor:

sudo vi /etc/apt/sources.list

4. Replace all instances of ‘buster’ with ‘bullseye’. Example in the /etc/apt/sources.list:

         a. Enter command below to replace ‘buster‘ to ‘bullseye‘.

:%s/buster/bullseye/g

          b. Will change to:

deb http://deb.debian.org/debian/ bullseye main 
deb-src http://deb.debian.org/debian/ bullseye main 
deb http://security.debian.org/ bullseye-security main 
deb-src http://security.debian.org/ bullseye-security main 
deb http://deb.debian.org/debian bullseye-updates main 
deb-src http://deb.debian.org/debian bullseye-updates main

 

5. Save and close the file.

:wq

6. Update the package list: *Press ‘y’ and enter if you see ‘Do you want to continue?’

sudo apt update

7. Perform a system upgrade: *Press ‘y’ and enter if you see ‘Do you want to continue?’

sudo apt upgrade --without-new-pkgs

8. Follow prompts to restart services or update configurations as needed.

 

 

Step 3: Upgrade Debian

1. Run a full upgrade to Debian 11: *Press ‘y’ and enter if you see ‘Do you want to continue?’

sudo apt full-upgrade

During this process, you may be prompted to make decisions regarding service restarts and configuration files. Choose appropriate options to maintain system stability.

Handle configuration prompts:

If you see this:

Configuration file '/etc/sysctl.conf' 
==> Modified (by you or by a script) since installation. 
==> Package distributor has shipped an updated version. 
What would you like to do about it ? Your options are: 
Y or I : install the package maintainer's version 
N or O : keep your currently-installed version 
D : show the differences between the versions 
Z : start a shell to examine the situation 
The default action is to keep your current version.

 

You can input Y to modify /etc/sysctl.conf.

 

Step 4: Reboot the Server

1. Reboot your server to apply changes:

sudo reboot now

2. Your SSH connection will be dropped during the reboot.

3. Log back into your server via SSH.

4. Verify the upgrade:

lsb_release -a

Expected output:

 

Conclusion

You have successfully upgraded your Debian server from version 10 to version 11. Your system now benefits from the latest features and security enhancements offered by Debian 11.

For additional assistance or if you encounter any issues, please contact our support team at support@ipserverone.com.