How to Upgrade Debian 11 Bullseye to Debian 12 Bookworm

This quick guide shows how to upgrade from Debian 11 Bullseye to Debian 12 Bookworm. Only a few simple steps are necessary.

Whats new in Debian 12?

The most important point and reason why you should upgrade to Debian 12 is that the new Kernel 6.1 has been implemented. This brings further stability to the system, which Debian is already known for.

Besides, many software components have been updated, such as KDE & Gnome.

The most special highlight is probably the PHP version 8.2 and Python 3.11.2.

How to Upgrade Debian 11 to 12

First you should change the package sources from Debian11 Bullseye to Debian 12 Bookworm. This is done automatically with the following command.

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

To start the update afterwards, the new repositories must be read and then the distro upgrade can be started.

sudo apt update
sudo apt dist-upgrade

I would advise to clean the system with autoremove after the upgrade.

sudo apt --purge autoremove

Quick guide

  1. sudo sed -i'.bak' 's/bullseye/bookworm/g' /etc/apt/sources.list

  2. sudo apt update

  3. sudo apt dist-upgrade