Skip to content

Upgrade Debian from 11 to 13

If you are under debian 11, and you want to upgrade to 13. You can follow the below steps.

Debian only supports upgrades one major version at a time, so you must pass through Bookworm (12) before reaching Trixie (13).

So we need to upgrade debian 11 to 12, then to 13.

1. Preparation of debian 11.

To make sure your debian 11 is ready. Let's run the below commands

# make sure you have the latest debian 11 packages
sudo apt update
sudo apt full-upgrade
sudo apt autoremove

# check your architecture
dpkg --print-architecture

# check your release version
lsb_release -a

# if you don't have lsb_release commands, you can install it
# lsb-release is the package name. The command is lsb_release
sudo apt install lsb-release

sudo reboot

2. Upgrade to Debian 12(Bookworm)

Edit the sources list by replacing bullseye source with bookworm source.

# open the source.list file and comment the old sources
sudo vim /etc/apt/sources.list

# add the new debian 12 sources
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware

Start the upgrade process

sudo apt update
sudo apt full-upgrade
sudo apt autoremove

# check your release version
lsb_release -a

# you should see debian 12 as output

# restart the server
sudo reboot

During the upgrade, you may be asked to confirm if you want to use the new default conf or your old conf for sudoer or sshd I recommend you to keep your version. Because the new conf may remove your sudo rights or ssh access.

3. Upgrade to Debian 13(Trixie)

Edit the sources list by replacing bookworm source with Trixie source.

# open the source.list file and comment the old sources
sudo vim /etc/apt/sources.list

# add the new debian 13 sources
deb http://deb.debian.org/debian trixie main contrib non-free non-free-firmware
deb http://deb.debian.org/debian-security trixie-security main contrib non-free non-free-firmware
deb http://deb.debian.org/debian trixie-updates main contrib non-free non-free-firmware

Start the upgrade process

sudo apt update
sudo apt full-upgrade
sudo apt autoremove

# check your release version
lsb_release -a

# you should see debian 13 as output

# restart the server
sudo reboot

During the upgrade, you may be asked to confirm if you want to use the new default conf or your old conf for sudoer or sshd I recommend you to keep your version. Because the new conf may remove your sudo rights or ssh access.

3. Post-upgrade cleanup

# Check services that were replaced or modified:
systemctl --failed

# verify the kernel
uname -a

# check your release version
lsb_release -a

# verify the firmware
dpkg -l | grep firmware