{"id":9200,"date":"2026-09-24T13:11:12","date_gmt":"2026-09-24T07:41:12","guid":{"rendered":"https:\/\/www.veeble.com\/kb\/?p=9200"},"modified":"2026-09-24T13:11:12","modified_gmt":"2026-09-24T07:41:12","slug":"upgrade-debian-12-to-debian-13","status":"publish","type":"post","link":"https:\/\/www.veeble.com\/kb\/upgrade-debian-12-to-debian-13\/","title":{"rendered":"How to Upgrade Debian 12 to Debian 13 Safely"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/09\/Screenshot-2026-09-23-124734.jpg\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"514\" src=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/09\/Screenshot-2026-09-23-124734-1024x514.jpg\" alt=\"\" class=\"wp-image-9208\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/09\/Screenshot-2026-09-23-124734-1024x514.jpg 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/09\/Screenshot-2026-09-23-124734-300x150.jpg 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/09\/Screenshot-2026-09-23-124734-768x385.jpg 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/09\/Screenshot-2026-09-23-124734.jpg 1230w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Debian supports a direct upgrade from <strong>Debian 12 (Bookworm) to Debian 13 (Trixie)<\/strong> using APT. The process is straightforward, but on a VPS or production server, a little preparation can save you from a difficult recovery.<\/p>\n\n\n\n<p>This guide covers the shortest safe upgrade path.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"before-you-start\">Before You Start<\/h2>\n\n\n<p>Before changing anything:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Take a <strong>full backup or VPS snapshot<\/strong>.<\/li>\n\n\n\n<li>Make sure you have <strong>root or sudo access<\/strong>.<\/li>\n\n\n\n<li>Keep <strong>console access<\/strong> available in case SSH or networking fails after reboot.<\/li>\n\n\n\n<li>Disable third-party repositories until the upgrade is complete.<\/li>\n\n\n\n<li>Make sure there is enough free disk space, especially under <code>\/var<\/code> and <code>\/boot<\/code>.<\/li>\n<\/ul>\n\n\n\n<p>If upgrading through SSH, running the upgrade inside <code>tmux<\/code> or <code>screen<\/code> is a good precaution.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote has-vivid-red-color has-cyan-bluish-gray-background-color has-text-color has-background has-link-color wp-elements-633cf68c9c6c0431f0f8f747bc5450e7 is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong><em>Important: <\/em><\/strong><em>Debian supports this upgrade path from Debian 12 only. Debian 13 should not be used as an in-place upgrade target for a 32-bit i386 installation.<\/em><\/p>\n<\/blockquote>\n\n\n<h2 class=\"wp-block-heading\" id=\"step-1-update-debian-12-first\">Step 1: Update Debian 12 First<\/h2>\n\n\n<p>Check your current Debian version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat \/etc\/os-release<\/code><\/pre>\n\n\n\n<p>You should see Debian 12 with the codename <code>bookworm<\/code>.<\/p>\n\n\n\n<p>Now update the existing system completely:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt full-upgrade<\/code><\/pre>\n\n\n\n<p>Reboot if a new kernel or other important system packages were installed:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo reboot<\/code><\/pre>\n\n\n\n<p>After reconnecting, check for package problems or held packages:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dpkg --audit\nsudo apt-mark showhold<\/code><\/pre>\n\n\n\n<p><code>dpkg --audit<\/code> should normally return no output. Review any held packages before continuing.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"step-2-change-the-repositories-from-bookworm-to-trixie\">Step 2: Change the Repositories from Bookworm to Trixie<\/h2>\n\n\n<p>First, find all repository entries that still reference Bookworm:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -R \"bookworm\" \/etc\/apt\/sources.list \/etc\/apt\/sources.list.d\/ 2&gt;\/dev\/null<\/code><\/pre>\n\n\n\n<p>Edit your <strong>official Debian repositories<\/strong> and change:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>bookworm\nbookworm-updates\nbookworm-security<\/code><\/pre>\n\n\n\n<p>to:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>trixie\ntrixie-updates\ntrixie-security<\/code><\/pre>\n\n\n\n<p>For example, a traditional <code>sources.list<\/code> configuration may look similar to:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>deb https:\/\/deb.debian.org\/debian trixie main non-free-firmware\ndeb https:\/\/deb.debian.org\/debian trixie-updates main non-free-firmware\ndeb https:\/\/security.debian.org\/debian-security trixie-security main non-free-firmware<\/code><\/pre>\n\n\n\n<p>Keep any additional components such as &#8220;contrib&#8221; or &#8220;non-free&#8221; if your server already requires them.<\/p>\n\n\n\n<p>Do <strong>not<\/strong> blindly change third-party repositories from Bookworm to Trixie. Disable them and enable them again only after confirming that the vendor supports Debian 13.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"step-3-run-the-minimal-upgrade\">Step 3: Run the Minimal Upgrade<\/h2>\n\n\n<p>Refresh APT using the new Debian 13 repositories:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update<\/code><\/pre>\n\n\n\n<p>Check the output for repository errors before continuing.<\/p>\n\n\n\n<p>Debian recommends performing the upgrade in two stages. Start with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt upgrade --without-new-pkgs<\/code><\/pre>\n\n\n\n<p>This upgrades packages that do not require new packages to be installed or existing ones to be removed.<\/p>\n\n\n\n<p>Read any configuration prompts carefully, especially if you have customised services such as SSH, Nginx, Apache, MariaDB, or networking.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"step-4-complete-the-debian-13-upgrade\">Step 4: Complete the Debian 13 Upgrade<\/h2>\n\n\n<p>Now run the full upgrade:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt full-upgrade<\/code><\/pre>\n\n\n\n<p>APT will install the remaining Debian 13 packages, handle dependency changes, and remove packages that conflict with the new release.<\/p>\n\n\n\n<p>Review the package removal list before confirming it. If APT wants to remove something critical to your server, investigate before continuing.<\/p>\n\n\n\n<p>Once the upgrade finishes, reboot:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo reboot<\/code><\/pre>\n\n\n<h2 class=\"wp-block-heading\" id=\"step-5-verify-debian-13\">Step 5: Verify Debian 13<\/h2>\n\n\n<p>After the server comes back online, confirm the new release:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat \/etc\/os-release<\/code><\/pre>\n\n\n\n<p>You should now see:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>VERSION_ID=\"13\"\nVERSION_CODENAME=trixie<\/code><\/pre>\n\n\n\n<p>Check the running kernel:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>uname -r<\/code><\/pre>\n\n\n\n<p>Then check for failed services:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl --failed<\/code><\/pre>\n\n\n\n<p>If this returns no failed units, the main system services have started normally.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"clean-up-old-packages\">Clean Up Old Packages<\/h2>\n\n\n<p>Review packages that are no longer required:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt autoremove<\/code><\/pre>\n\n\n\n<p>Confirm the removal list before proceeding.<\/p>\n\n\n\n<p>Debian 13 also supports the newer DEB822 repository format. If your server still uses the older <code>sources.list<\/code> format, you can convert it with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt modernize-sources<\/code><\/pre>\n\n\n\n<p>Finally, update the package list once more:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update<\/code><\/pre>\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n<p>The safest Debian 12 to Debian 13 upgrade is simple: fully update Bookworm, back up the server, switch the official repositories to Trixie, run the minimal upgrade, then complete the upgrade with <code>apt full-upgrade<\/code>.<\/p>\n\n\n\n<p>For production servers, always keep console access and a recent snapshot available until you have confirmed that networking, web servers, databases, and other important services are working normally.<\/p>\n\n\n\n<div style=\"margin: 40px 0 30px;padding: 28px 30px;border: 1px solid #e5e7eb;border-radius: 12px;background: #ffffff;align-items: center;justify-content: space-between;flex-wrap: wrap;gap: 25px\">\n\n    <div style=\"flex: 1;min-width: 260px;max-width: 700px\">\n\n        <div style=\"margin-bottom: 7px;font-size: 12px;line-height: 1.4;font-weight: 600;letter-spacing: 1px;text-transform: uppercase;color: #4f63f6\">\n            Veeble VPS\n        <\/div>\n\n        <h3 style=\"margin: 0 0 8px;padding: 0;font-size: 23px;line-height: 1.35;font-weight: 650;color: #111111\">\n            Prefer a Fresh Debian Server?\n        <\/h3>\n\n        <p style=\"margin: 0;padding: 0;font-size: 15px;line-height: 1.65;color: #5f6368\">\n            Start with a new VPS and migrate your applications instead of upgrading your existing server in place.\n        <\/p>\n\n    <\/div>\n\n    <div style=\"flex-shrink: 0;align-items: center\">\n        <a href=\"https:\/\/www.veeble.com\/in\/vps-hosting\/\" style=\"padding: 12px 19px;background: #111111;border: 1px solid #111111;border-radius: 7px;color: #ffffff;font-size: 14px;line-height: 1.4;font-weight: 600;text-decoration: none;white-space: nowrap\">\n            View VPS Plans &nbsp;\u2192\n        <\/a>\n    <\/div>\n\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Debian supports a direct upgrade from Debian 12 (Bookworm) to Debian 13 (Trixie) using APT. The process is straightforward, but on a VPS or [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":9207,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","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":"set","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":[5],"tags":[133,114,132,130,131,67,134,68],"class_list":["post-9200","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-bookworm-2","tag-debian","tag-debian-12-2","tag-debian-13-2","tag-debian-upgrade-2","tag-linux","tag-trixie-2","tag-vps"],"uagb_featured_image_src":{"full":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/09\/screenshot12.jpg",1672,941,false],"thumbnail":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/09\/screenshot12-150x150.jpg",150,150,true],"medium":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/09\/screenshot12-300x169.jpg",300,169,true],"medium_large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/09\/screenshot12-768x432.jpg",768,432,true],"large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/09\/screenshot12-1024x576.jpg",1024,576,true],"1536x1536":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/09\/screenshot12-1536x864.jpg",1536,864,true],"2048x2048":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/09\/screenshot12.jpg",1672,941,false]},"uagb_author_info":{"display_name":"Nasarul Naseer","author_link":"https:\/\/www.veeble.com\/kb\/author\/nasarulnaseer\/"},"uagb_comment_info":0,"uagb_excerpt":"Debian supports a direct upgrade from Debian 12 (Bookworm) to Debian 13 (Trixie) using APT. The process is straightforward, but on a VPS or [&hellip;]","_links":{"self":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/9200","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/comments?post=9200"}],"version-history":[{"count":8,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/9200\/revisions"}],"predecessor-version":[{"id":9210,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/9200\/revisions\/9210"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media\/9207"}],"wp:attachment":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media?parent=9200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/categories?post=9200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/tags?post=9200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}