{"id":22273,"date":"2024-07-01T12:12:32","date_gmt":"2024-07-01T10:12:32","guid":{"rendered":"https:\/\/contabo.com\/blog\/kb\/103000296654-how-do-i-upgrade-my-server-from-debian-11-to-debian-12\/"},"modified":"2025-04-10T18:15:04","modified_gmt":"2025-04-10T16:15:04","slug":"103000296654-how-do-i-upgrade-my-server-from-debian-11-to-debian-12","status":"publish","type":"kb","link":"https:\/\/contabo.com\/blog\/kb\/103000296654-how-do-i-upgrade-my-server-from-debian-11-to-debian-12\/","title":{"rendered":"How Do I Upgrade My Server From Debian 11 to Debian 12?"},"content":{"rendered":"<h4 dir=\"ltr\"><strong>How do I upgrade my server from Debian 11 to Debian 12?<\/strong><\/h4>\n<p dir=\"ltr\">You can follow the steps below to upgrade your server from Debian 11 to Debian 12:<\/p>\n<ol>\n<li dir=\"ltr\">Make a snapshot or backup of your server to make sure no data is lost. You can find a guide on <u><a href=\"https:\/\/help.contabo.com\/en\/support\/solutions\/articles\/103000270385-how-do-i-create-a-snapshot-of-my-server-\" rel=\"noopener noreferrer nofollow\" target=\"_blank\"><u dir=\"ltr\">how to create a snapshot here<\/u><\/a><\/u> and a guide on <a href=\"https:\/\/help.contabo.com\/en\/support\/solutions\/articles\/103000281488-how-do-i-create-a-backup-using-the-contabo-backup-space-\" rel=\"noopener noreferrer nofollow\" target=\"_blank\"><u dir=\"ltr\">how to create a backup here<\/u><\/a>.\n<\/li>\n<li dir=\"ltr\">First you need to remove any non-Debian packages from your server, you can run the following command to find all of the non-Debian packages:\n<pre><code dir=\"ltr\">sudo apt list '?narrow(?installed, ?not(?origin(Debian)))'\n<\/code><code dir=\"ltr\">sudo apt-forktracer | sort<\/code><strong dir=\"ltr\">\n<\/strong><\/pre>\n<\/li>\n<li dir=\"ltr\">Next you need remove all packages with the hold status, you can run the following command to find all the packages with the hold status:\n<pre><code dir=\"ltr\">sudo apt-mark showhold | more<\/code><\/pre>\n<\/li>\n<li dir=\"ltr\">\n<p>Then you can run the following command to delete all the packages with the hold status:<\/p>\n<pre><code>sudo apt-mark unhold [package_name]<\/code><\/pre>\n<\/li>\n<li dir=\"ltr\">\n<p dir=\"ltr\">Next you need to make sure all packages and repositories are up to date by running the following command:<\/p>\n<pre>sudo apt update &amp;&amp; sudo apt upgrade<\/pre>\n<\/li>\n<li dir=\"ltr\">\n<p>Next you will need to update the APT&#8217;s source list files. First change the directory to etc\/apt with the following command:<\/p>\n<pre><code>cd \/etc\/apt<\/code><\/pre>\n<\/li>\n<li>Open the <em>sources.list<\/em> file using your preferred text editor. In the example we will use nano:&nbsp;\n<pre>sudo nano sources.list<\/pre>\n<\/li>\n<li dir=\"ltr\">\n<p>Using the text editor replace any sources that contain the word &#8220;bullseye&#8221; with &#8220;bookworm&#8221; for example &#8220;deb http:\/\/deb.debian.org\/debian bullseye&#8221; main to &#8220;deb http:\/\/deb.debian.org\/debian bookworm main&#8221;. <\/p>\n<p><\/li>\n<li>Run the following command to update the system repositories:\n<pre><code>sudo apt update<\/code><\/pre>\n<\/li>\n<li dir=\"ltr\">When prompted to restart service packages, select Yes using the arrow keys and press Enter.\n<\/li>\n<li dir=\"ltr\">Run the following command to restart the system to complete the upgrade process: &nbsp;\n<pre>systemctl reboot<\/pre>\n<\/li>\n<li dir=\"ltr\">After the reboot you can check the version by running this command:\n<pre><code>cat \/etc\/debian_version<\/code><\/pre>\n<\/li>\n<\/ol>\n<p><span class=\"ast-load-more active\"><a href=\"https:\/\/help.contabo.com\/en\/support\/solutions\/articles\/103000296654-how-do-i-upgrade-my-server-from-debian-11-to-debian-12-\" rel=\"nofollow\">Details&#8230;<\/a> <\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How do I upgrade my server from Debian 11 to Debian 12? You can follow the steps below to upgrade your server from Debian 11 to Debian 12: Make a snapshot or backup of your server to make sure no data is lost. You can find a guide on how to create a snapshot here [&hellip;]<\/p>\n","protected":false},"author":72,"featured_media":0,"template":"","meta":{"inline_featured_image":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[2067],"tags":[],"class_list":["post-22273","kb","type-kb","status-publish","hentry","category-kb"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Contabo Web","author_link":"https:\/\/contabo.com\/blog\/author\/julius-nalivaiko\/"},"uagb_comment_info":0,"uagb_excerpt":"How do I upgrade my server from Debian 11 to Debian 12? You can follow the steps below to upgrade your server from Debian 11 to Debian 12: Make a snapshot or backup of your server to make sure no data is lost. You can find a guide on how to create a snapshot here&hellip;","_links":{"self":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/kb\/22273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/users\/72"}],"version-history":[{"count":1,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/kb\/22273\/revisions"}],"predecessor-version":[{"id":22996,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/kb\/22273\/revisions\/22996"}],"wp:attachment":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/media?parent=22273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/categories?post=22273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/tags?post=22273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}