โฌ๏ธHow to upgrade Debian 11 to Debian 12
Discover how to upgrade your Debian 11 system to the latest version, Debian 12, with this comprehensive guide. The article provides step-by-step instructions for preparing your system.
Requirements
a VPS
Pre-upgrade Preparation:
Backup Data: Before proceeding with the upgrade, make sure to backup all your important data. Although the upgrade is designed to be smooth, it's always better to be safe.
Update Debian 11: Ensure your Debian 11 system is fully updated by running the following command:
Disable Third-party Repositories: If you have added any third-party repositories to your system, it's recommended to disable them temporarily. You can do this by commenting out or removing their entries in the
/etc/apt/sources.list
file or the files in the/etc/apt/sources.list.d/
directory.
Upgrading Debian 11 to Debian 12:
Update APT Repository: First, update the APT package repository information to include Debian 12. Edit the
/etc/apt/sources.list
file and replace occurrences ofbullseye
withbookworm
(the codename for Debian 12).Update Package Lists: After modifying the sources list, update the package lists by running:
Upgrade Installed Packages: Once the package lists are updated, upgrade the installed packages to their latest versions with:
Start the Distribution Upgrade: Initiate the distribution upgrade by running:
Follow On-screen Prompts: During the upgrade process, you may be prompted to confirm package upgrades or resolve conflicts. Follow the on-screen instructions carefully.
Reboot the System: After the upgrade process is complete, it's recommended to reboot your system to apply all changes:
Verification: After rebooting, verify that the upgrade was successful by checking the Debian version:
Post-upgrade Steps:
Re-enable Third-party Repositories: If you disabled any third-party repositories earlier, you can re-enable them now.
Clean Up: You can remove obsolete packages and free up disk space by running:
Verify Services: Check that all your essential services and applications are functioning correctly after the upgrade.
By following these steps, you should be able to successfully upgrade your Debian 11 system to Debian 12. Remember to exercise caution and back up your data before proceeding with any major system changes.
Last updated