Debian 12, codenamed Bookworm, has recently been released, bringing numerous new features and enhanced performance. If you’re looking to upgrade your Debian 11 system to Debian 12 and make the most of this latest operating system, follow this step-by-step guide.
Step 1: Verify Your Current Debian Version
Before you start the upgrade process, make sure you’re running Debian 11. You can check your Debian distribution and version using the command:
lsb_release -d or
Step 2: Update and Upgrade Your Debian 11 Packages
Ensure all your Debian 11 packages are up to date by running
sudo apt update,
sudo apt upgrade,
sudo apt dist-upgrade, and cleaning up residual packages and configuration files.
Step 3: Backup Your Data
Back up essential data, including the contents of
/var/lib/apt/extended_states, and the output of
dpkg --get-selections "*".
Step 4: Modify the /etc/apt/sources.list File
Update your software sources by replacing “bullseye” with “bookworm” in the
/etc/apt/sources.list file and the files within the
/etc/apt/sources.list.d/ directory. Add the “non-free-firmware” repository if needed.
Step 5: Perform Minimal System Upgrade
Perform a minimal upgrade to ensure the upgrade process doesn’t remove necessary packages. Use the command
sudo apt upgrade --without-new-pkgs and respond to prompts as needed.
Step 6: Upgrade to Debian 12
sudo apt full-upgrade to perform a full system upgrade to Debian 12. Pay attention to prompts and questions during the process.
Step 7: Verify if Everything Works Fine
After the upgrade, ensure all applications and functionalities are working correctly. Report any issues or seek assistance if needed.
Step 8: Restore the Backup (Optional)
If everything is smooth, restore your backup to retain your previous configurations and data.
In summary, upgrading from Debian 11 to Debian 12 involves verifying your current version, updating packages, backing up data, modifying software sources, performing minimal and full system upgrades, and verifying post-upgrade functionality. Following these steps will help you seamlessly transition to Debian 12 Bookworm.