Update Debian 10 (buster) to Debian 11 (bullseye)

1. Check version

cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"

2. Update and upgrade

sudo apt update -y && sudo apt upgrade -y

3. Distro upgrade

sudo apt dist-upgrade

4. Update Package repos

Replace with sed distro name

sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list

Update debian-security lines in /etc/apt/sources.list

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

## Replace with these:
deb https://deb.debian.org/debian-security bullseye-security main contrib
deb-src https://deb.debian.org/debian-security bullseye-security main contrib

Final list should look like this:

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

Update repos:

sudo apt update

5. Perform minimal system upgrade

sudo apt upgrade --without-new-pkgs

Press yes on prompt:

6. Perform full upgrade to Deb11

sudo apt full-upgrade

Press keep current version

7. reboot and check version

reboot
cat /etc/os-release

Last updated