Linux systems using tools such as BackupPC<\/a>.<\/p>\n\n\n\nLogin to your System via Physical Console<\/h3>\n\n\n\n
Personally, I wont recommend any system upgrade to be done via SSH. What if you loose connection in the middle of upgrade? You brick your system!<\/p>\n\n\n\n
So, use physical console or any direct access method.<\/p>\n\n\n\n
Run Full System Update<\/h3>\n\n\n\n
Ensure that your system is up-to-date by executing the commands below.<\/p>\n\n\n\n
Hold on, before we can ran upgrade, let’s confirm our Debian 11 system details;<\/p>\n\n\n\n
hostnamectl<\/code><\/pre>\n\n\n\n\n Static hostname: debian11\n Icon name: computer-vm\n Chassis: vm\n Machine ID: a417481aacd84ee19371d9b5e109cf12\n Boot ID: 3300de73894747b1808316e1c4895158\n Virtualization: oracle\n Operating System: Debian GNU\/Linux 11 (bullseye)\n Kernel: Linux 5.10.0-8-amd64\n Architecture: x86-64\n<\/code><\/pre>\n\n\n\nThe OS and the current Kernal details;<\/p>\n\n\n\n
\n- Operating System: <\/strong>Debian GNU\/Linux 11 (bullseye)<\/li>\n\n\n\n
- Kernel: <\/strong>Linux 5.10.0-8-amd64<\/li>\n<\/ul>\n\n\n\n
Debian Version;<\/p>\n\n\n\n
cat \/etc\/debian_version<\/code><\/pre>\n\n\n\n11.3<\/code><\/pre>\n\n\n\nNow, proceed with system repositories update.<\/p>\n\n\n\n
apt update<\/code><\/pre>\n\n\n\nRun system upgrade;<\/p>\n\n\n\n
apt upgrade --auto-remove<\/code><\/pre>\n\n\n\nOnce that is done, run the smart upgrade;<\/p>\n\n\n\n
apt dist-upgrade<\/code><\/pre>\n\n\n\nReboot the System<\/h3>\n\n\n\n
Once the upgrade completes successfully, reboot the system to effect all the upgrade changes.<\/p>\n\n\n\n
systemctl reboot<\/code><\/pre>\n\n\n\nAfter system reboot, one thing to note is that my system has now moved to Debian 11.7 from Debian 11.3 after update.<\/p>\n\n\n\n
Let’s move on to see how to now upgrade Debian 11.<\/p>\n\n\n\n
Update System Repositories<\/h3>\n\n\n\n
In order to upgrade from Debian 11 to Debian 12, we need to update the current system repositories from Debian 11’s repos, bullseye<\/strong><\/code>, to Debian 12’s repos, bookworm<\/code><\/strong>.<\/p>\n\n\n\nThese are my Debian 11’s current system repositories;<\/p>\n\n\n\n
grep -ir bullseye \/etc\/apt\/sources.list | grep -vE \"^#\"<\/code><\/pre>\n\n\n\n\ndeb http:\/\/deb.debian.org\/debian\/ bullseye main\ndeb-src http:\/\/deb.debian.org\/debian\/ bullseye main\ndeb http:\/\/security.debian.org\/debian-security bullseye-security main\ndeb-src http:\/\/security.debian.org\/debian-security bullseye-security main\ndeb http:\/\/deb.debian.org\/debian\/ bullseye-updates main\ndeb-src http:\/\/deb.debian.org\/debian\/ bullseye-updates main\n<\/code><\/pre>\n\n\n\nSo, we need to update them as follows;<\/p>\n\n\n\n
sed -i.bak 's\/bullseye\/bookworm\/' \/etc\/apt\/sources.list<\/code><\/pre>\n\n\n\nThe repos now look like;<\/p>\n\n\n\n
grep -vE \"^#|^$\" \/etc\/apt\/sources.list<\/code><\/pre>\n\n\n\n\ndeb http:\/\/deb.debian.org\/debian\/ bookworm main\ndeb-src http:\/\/deb.debian.org\/debian\/ bookworm main\ndeb http:\/\/security.debian.org\/debian-security bookworm-security main\ndeb-src http:\/\/security.debian.org\/debian-security bookworm-security main\ndeb http:\/\/deb.debian.org\/debian\/ bookworm-updates main\ndeb-src http:\/\/deb.debian.org\/debian\/ bookworm-updates main\n<\/code><\/pre>\n\n\n\nSimilarly, if you have custom repos in the \/etc\/apt\/sources.list.d<\/code><\/strong> directory, then update them accordingly.<\/p>\n\n\n\nOptionally Install Non-Free-Firmware Repositories<\/h3>\n\n\n\n
Non-free-firmware repositories provide packages that requires a user to explicitly accept end user license agreement before a package can be installed. These repositories are usually required to install packages relating to various hardware such as WiFi controllers, Bluetooth, Graphics, Sound, e.t.c especially on Desktop systems.<\/p>\n\n\n\n
If you therefore have non-free firmware installed it is recommended to add non-free-firmware<\/strong> to your APT sources-list. To install such repos, update the sources.list file as follows;<\/p>\n\n\n\n\ncat >> \/etc\/apt\/sources.list << 'EOL'\n# Non-Free-Firmware\ndeb http:\/\/deb.debian.org\/debian bookworm non-free non-free-firmware\ndeb http:\/\/deb.debian.org\/debian-security bookworm-security non-free non-free-firmware\ndeb http:\/\/deb.debian.org\/debian bookworm-updates non-free non-free-firmware\nEOL\n<\/code><\/pre>\n\n\n\nRemove bullseye-backports Repositories<\/h3>\n\n\n\n
If you have any bullseye-backports<\/code><\/strong> repositories installed, it is recommended to remove them from source-list files before the upgrade. If you really need them, you can add back after the upgrade.<\/p>\n\n\n\ngrep -irl 'bullseye-backports' \/etc\/apt\/sources.list* |\\\n xargs -I {} sed -i '\/bullseye-backports\/s\/^\/#\/' {}<\/code><\/pre>\n\n\n\nUpgrading Debian 11 to Debian 12<\/h3>\n\n\n\n
It is time to upgrade!<\/p>\n\n\n\n
Run system package cache update;<\/p>\n\n\n\n
apt update<\/code><\/pre>\n\n\n\nNext, perform minimal system upgrade to only update the existing packages without installing any new packages in the system<\/p>\n\n\n\n
apt upgrade --without-new-pkgs<\/code><\/pre>\n\n\n\nDuring the upgrade process, you will get apt-listchanges<\/strong><\/code> new!<\/p>\n\n\n\nGo through the news and press q<\/code><\/strong> to exit when done reading, -:)<\/p>\n\n\n\nYou will also be prompted on whether to restart some services during upgrade. Accept (yes<\/strong>) and move forward.<\/p>\n\n\n\nDo full system upgrade now from Debian 11 to Debian 12;<\/p>\n\n\n\n
apt full-upgrade<\/code><\/pre>\n\n\n\nDuring upgrade, you will receive prompts on whether to override configurations of old packages with new configurations. For example;<\/p>\n\n\n\n
\nConfiguration file '\/etc\/nginx\/nginx.conf'\n ==> Modified (by you or by a script) since installation.\n ==> Package distributor has shipped an updated version.\n What would you like to do about it ? Your options are:\n Y or I : install the package maintainer's version\n N or O : keep your currently-installed version\n D : show the differences between the versions\n Z : start a shell to examine the situation\n The default action is to keep your current version.\n*** nginx.conf (Y\/I\/N\/O\/D\/Z) [default=N] ?\n<\/code><\/pre>\n\n\n\nFor me, I will choose to keep currently-installed version configs.<\/p>\n\n\n\n
Review the prompts and proceed appropriately.<\/p>\n\n\n\n
Reboot the System<\/h3>\n\n\n\n
Once the upgrade is done, reboot the system.<\/p>\n\n\n\n
systemctl reboot<\/code><\/pre>\n\n\n\nVerify System Upgrade<\/h3>\n\n\n\n
Once the system boots up, launch a terminal and start to check if everything is okay. Including any services that you might have installed on the previous OS version.<\/p>\n\n\n\n
For us, let's check some basic system information.<\/p>\n\n\n\n
hostnamectl<\/code><\/pre>\n\n\n\n\n Static hostname: debian11\n Icon name: computer-vm\n Chassis: vm \ud83d\uddb4\n Machine ID: a417481aacd84ee19371d9b5e109cf12\n Boot ID: 934ad7ae1e2a4679b8aedb7eedc6697b\n Virtualization: oracle\nOperating System: Debian GNU\/Linux 12 (bookworm) \n Kernel: Linux 6.1.0-9-amd64 <\/strong>\n Architecture: x86-64\n Hardware Vendor: innotek GmbH\n Hardware Model: VirtualBox\nFirmware Version: VirtualBox\n<\/code><\/pre>\n\n\n\nWe are now on Debian 12;<\/p>\n\n\n\n
Operating System: Debian GNU\/Linux 12 (bookworm) \n Kernel: Linux 6.1.0-9-amd64<\/strong><\/code><\/pre>\n\n\n\ncat \/etc\/debian_version<\/code><\/pre>\n\n\n\n12.0<\/code><\/pre>\n\n\n\nAnd that is it! You have successfully upgraded your Debian 11 system to Debian 12.<\/p>\n\n\n\n
That closes our guide on upgrading Debian 11 to Debian 12.<\/p>\n\n\n\n
Other Tutorials<\/h2>\n\n\n\n
System\/tools upgrades<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"Are you looking for a quick way to upgrade Debian 11 to Debian 12? Look no further, this guide will take you through all the<\/p>\n","protected":false},"author":10,"featured_media":17172,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,49,2959],"tags":[6859,6858,6860,6857],"class_list":["post-17157","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-command-cheatsheets","category-os","tag-debian-12","tag-debian-12-bookworm","tag-debian-12-upgrade","tag-debian-12-upgrade-from-debian-11","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/17157"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=17157"}],"version-history":[{"count":13,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/17157\/revisions"}],"predecessor-version":[{"id":20793,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/17157\/revisions\/20793"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/17172"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=17157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=17157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=17157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}