Upgrade Debian 11 to Debian 12 Bookworm

Upgrade Debian 11 to Debian 12 Bookworm

This simple tutorial shows how to Upgrade Debian 11 to Debian 12 Bookworm. The Update process is divided in 8 simple steps.

1. Backup the system!

If you are using a VM or Container I would highly recommend to back up through the hypervisors UI, if you are on a local machine please also backup your entire machine!

2. Update existing packages and reboot the Debian 11 system

apt update
apt upgrade
apt full-upgrade
apt --purge autoremove

3. Edit sources.list

The easiest method is to replace bullseye with bookworm with the following command

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

Also do the same for sources.list files in the folder /etc/apt/sources.list.d/

sed -i -e 's/bullseye/bookworm/g' /etc/apt/sources.list.d/*.*

4. Update the packages index on Debian Linux

apt update

5. Prepare for the operating system minimal system upgrade

apt upgrade --without-new-pkgs

6. Finally, update Debian 11 to Debian 12 Bookworm

apt full-upgrade

7. Reboot

reboot

8. Verify

lsb_release -a should show Release: 12 and debian_version should show 12.x

lsb_release -a
Upgrade Debian 11 to Debian 12 Bookworm lsb release a
cat /etc/debian_version
Upgrade Debian 11 to Debian 12 Bookworm debian version

The Upgrade Debian 11 to Debian 12 Bookworm is now completed.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *