How to Upgrade Debian 11 to Debian 12

Refresh package lists and upgrade all installed packages:

sudo apt update && sudo apt upgrade -y
sudo apt full-upgrade
sudo apt autoremove

Reboot to ensure all updates are properly applied:

reboot

Change repository references in /etc/apt/sources.list from “bullseye” to “bookworm”.

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

Update the package index and commence the upgrade:

sudo apt update
sudo apt upgrade -y
sudo apt full-upgrade

Remove obsolete packages and reboot for changes to take effect:

sudo apt autoremove
sudo reboot

Back to Debian

Comments

Leave a Reply

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