How to Upgrade Debian 12 to Debian 13 ‘Trixie’ Safely

Did you know your Debian 12 system also has an expiry date? Don’t risk running out of support. Upgrade to Debian 13 and unlock new features, better hardware support, and five more years of rock-solid stability.

But if you are thinking that upgrading from Debian 12 to 13 does not worth it, then let me tell you the Key Benefits you will get with Debian 13 Over Debian 12.

Key Benefits of Debian 13

1. New Hardware Support: For the First time Debian officially Supports RISC-V architecture. Meaning now you can test or use Debian on a fully Open Source Hardware.

2. Performance Boost: Using Phoronix Test Suite it was found that Debian 13 shows an average performance improvement of 10 to 13 percent over Debian 12.

3. Kernel Upgrade: Debian 13 features an upgrade from Linux kernel 6.1 to 6.12, enhancing and optimising performance for modern multi-core processors.

4. Updated Software Packages: Debian 13 includes newer versions of essential software, such as GNU C Compiler 14.2, Python 3.13, and OpenJDK 21, which improve efficiency and compatibility.

5. Enhanced Desktop Environment: The default GNOME desktop environment is upgraded from version 43 to 48, along with all other Desktop Environment, offering a more refined user experience.

6. Security and Stability: And as with all the previous releases, Debian 13 maintains the project’s commitment to security enhancements and stability while integrating modern software trends.

These improvements has already made Debian 13 a compelling upgrade choice for many users, who are seeking better performance, enhanced features, and improved security.

Important: Check Your Hardware Compatibility

The Upgrading process from Debian 12 to 13 stable releases is generally very easy and straight forward. But Debian’s official documentation suggest that you should be informed about few key important details first. Especially about the discontinued hardware architectures.

- Debian 13 has fully dropped support for x86 32-bit architechture, so pure 32-bit systems can not do this upgrade.

- Arm32-bit still works, but only with older Raspberry Pi models, and Debian 13 will be the final release supporting it.

- And finally, MIPS architecture is gone completely.

So If you are on any of these architecture, you will have to switch your hardware.

Upgrade Process Overview

But If hardware is not an issue then you have to follow few steps for the upgrade, which are majorly divided into these four categories:

1. Update and Clean Up (5 Minutes)

2. Back up (2 Minutes)

3. Editing the Repositories (2 Minutes)

4. System Update and Upgrade (15 to 20 Minutes)

Step 1.1: Update and Clean Up

The first and foremost thing to do is update your system to the latest Point Release, and then Clean up your system. To do this use the following command:

sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt clean

The first two command will Update your system to the latest, then the last two will remove your systems unused packages, dependencies, and cache files.

Step 1.2: Remove Obsolete Packages

Then after running the above command you have to continue with more clean up process and check if there are any obsolete packages available in your system or not, using this command:

apt list '?obsolete'

If the result returns with nothing, then you can proceed to the next step.

But if it shows that obsolete packages are present in your system, then you have to remove them all before the actual system upgrade. To do that use this command:

sudo apt purge '?obsolete'

This will remove all the obsolete packages from your system. You can re-verify if all the obsolete packages are gone or not using the Previous command. Removing obsolete packages are very important because it may introduce complications during the upgrade process, and can present security risks as they are no longer maintained.

Step 1.3: Disable Backports (If Enabled)

If you have ever enabled the Debian Backports facility on Debian 12 then you have to disable it as well. For that you have to check if backports repo is enabled or not, using the command:

cat /etc/apt/sources.list | grep backports

If the result returns nothing then you are all good to move forward to the next step but if you see something like this below image:

That means backports are enabled on your system and you have to Disable it. For that you just have to uncomment or comment out the backport source line in the sources.list file.

You have to Open the sources.list file with your preferred text editor, using the command:

sudo nano /etc/apt/sources.list

This will open the sources.list file and you have put a Hash or Pound sign # in front of the backports line, just like this, and then save the file using Ctrl+o and use Ctrl+x to exit (Note: If there are multiple Backports line you have to uncomment them all):

# deb http://deb.debian.org/debian bookworm-backports main contrib non-free-firmware

This will disable the backports line eventually disabling the backports services from Debian 12.

And Finally If you have installed any non-Debian packages, then you have to remove them as well, which will complete our first step.

Step 2: Back up

Before upgrading from Debian 12 to 13, Debian strongly recommends that you make a full backup of your system, using apps like Timeshift. Or you at least back up any data, config files or information that you cannot afford to lose.

Debian officially mentions to back up these directories:

  • /etc
  • /var/lib/dpkg
  • /var/lib/apt

As the upgrade process itself does not modify anything in the /home directory, you can also back it up there, or else you can use an external hard drive or USB drive as well.

For better segregation I will suggest you to create a separate /backup directory inside the /home directory and for backing up use the following command:

sudo cp -r /etc/ /var/lib/dpkg/ /var/lib/apt/ -t /home/user_name/backup

This backup process will usually be complete within 1 to 2 minutes.

Step 3: Editing the Repositories

Here you have to Switch the Debian repositories from Bookworm to Trixie by updating the sources.list file.

For that you have to Open and edit the sources.list file, using:

sudo nano /etc/apt/sources.list

Here the goal is to replace the word “bookworm” with “trixie”.

Just for clarification the words which we using here are the code names of different Debian Versions. “bookworm” is the code name of Debian 12 and “trixie” is the code name of present stable version that is Debian 13.

You can Individually edit all the lines but the quickest way to this will be using replace function. For that you have to hit Ctrl+Backslash (^\), then it will ask you to enter the word you want to search or replace, So you will write “bookworm” and then press enter.

Next it will ask you to enter the word that you want “bookworm” to be replaced with, So you will have to enter “trixie” here and then press enter. Following with “a” to replace all at once. Then Ctrl+o to save and Ctrl+x to exit

And that’s it, the repo editing will be complete.

Step 4.1: System Update

And finally after this you can now Upgrade your system from Debian 12 to 13. For that Open the terminal and run the following command to start the upgrade process.

First update the repos with:

sudo apt update

This will take 3 to 5 mins depending on your internet speed.

Step 4.2: Minimal Upgrade First

Next to minimize the risk of breaking the system during the early stages of a major version upgrade, Debian recommends to just Upgrade the system with the minimal base install, and to do that use this command:

sudo apt upgrade --without-new-pkgs

This ensures all current packages are updated without introducing new ones, thereby reducing the likelihood of dependency issues.

Note: During the upgrade process, the installer might show you some memos, which you can skip using q button and it might also ask you about several services being restarted. So Hit “Yes” or “No” according to your preference after carefully reading the messages.

Step 4.3: Full System Upgrade

After Minimal Upgrade is done, now you can execute the full upgrade with:

sudo apt full-upgrade

This will handle dependency changes, install new packages, while completing the transition to the new release. Wait for the download and installation of the package, and after the upgrade is complete, use:

sudo apt modernize-sources

To modernize the sources file. Because Debian, from version 13 onwards, is transitioning to a newer, more structured format called “deb822” which will be using .sources files instead of .list files.

Reboot and Verify

After the full-upgrade is completed you can reboot your System with:

sudo systemctl reboot

And the upgrade from Debian 12 to Debian 13 will be complete.

After rebooting, you can verify the upgrade by checking your system details. The OS should show “Debian 13 - Trixie” and the Kernel version should be 6.12 which is a Long Term Support kernel.

I hope this guide will make your Debian Upgrade much easier. The process is straightforward if you follow these steps carefully, and you’ll be enjoying the improved performance and new features of Debian 13 in no time.

💬 Engage With The Community:

🎬 Prefer watching? Here’s the detailed video:

📑 Related Posts:

🔀 Share this Article: