Upgrading Debian to a New Version: Bullseye to Bookworm

VDS / VPS Servers · 19.04.2026
Upgrading Debian to a New Version: Bullseye to Bookworm

Upgrading Debian 11 → 12 Step by Step

# Step 1: Fully update current version
sudo apt update && sudo apt full-upgrade -y

# Step 2: Update package sources
sudo sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list

# Step 3: Upgrade (run in screen!)
sudo screen -S debian-upgrade
sudo apt update
sudo apt upgrade --without-new-pkgs -y
sudo apt full-upgrade -y
sudo reboot

Post-Upgrade Verification

cat /etc/debian_version
lsb_release -a
uname -r
⚠️ PHP and MySQL: Debian 12 ships with PHP 8.2 and MariaDB 10.11. If your code needs different versions — add third-party repos (ondrej/php, mariadb.org) AFTER the system upgrade.
← Back to Knowledge Base Ask Support