How to upgrade Debian 13 step by step
A Debian 13 upgrade helps keep your system current, secure, and ready for the future. The new release, Trixie, introduces a wide range of improvements and updated software packages for both servers and desktops. Upgrading from Debian 12 (Bookworm) is safe and can be done in just a few straightforward steps.
- Enterprise hardware
- Configurable hardware equipment
- ISO-certified data centres
Step 1: Prepare yourself
Before making any changes to your system, it’s important to review the official release notes for Debian 13 (Trixie). These notes cover known issues, highlight packages that need special attention, and outline any limitations that may affect your setup. Begin with the section on the Trixie upgrade and check whether any of the programs you use are mentioned. This step may seem small, but it can help you avoid major problems later on.
A Debian 13 upgrade is only possible from its direct predecessor, Debian 12. If you’re running another version or a different Linux distribution, you’ll need to re-install Debian 13!
Step 2: Create a full backup
The most important step before upgrading to Debian 13 is to create a backup of your data. While upgrades usually run smoothly, issues such as power outages, hardware failures, or package conflicts could leave your system unable to start afterward. A proper backup ensures you can restore your system at any time without losing data. It’s not only essential to make a backup, but also to verify that it works. Be sure to check that the files are complete after the backup.
At a minimum, back up /etc (configurations), /home (user files), database dumps (/var/lib/mysql or mysqldump), and all web or application data. If you are using a VM or cloud environment, also create a snapshot or image. Additionally, save the output of the following command:
dpkg --get-selections '*'bashThe result is a tabulated list of all packages known on your system, along with their status. You will need this to restore them after the Debian 13 upgrade.
Step 3: Check the current state of your system
Before beginning the Debian 13 upgrade, make sure that Debian 12 (Bookworm) is currently installed on your system. You can quickly verify this by running the following command to check your Debian version:
cat /etc/debian_versionbashThe output should show either ‘bookworm’ or ‘12’. It’s also important to check that you have enough available disk space. The upgrade will download many new packages that are stored temporarily, and without sufficient space the process may fail. Run the following terminal command to verify available disk space:
apt -o APT::Get::Trivial-Only=true full-upgradebashIf you receive the following warning in the output, you lack the necessary disk space for the Debian 13 upgrade and need to free up space before proceeding:
E: You don't have enough free space in /var/cache/apt/archives/.bashStep 4: Update the existing system
Before upgrading from Debian 12 to Debian 13, make sure your system is fully up to date. Run the following commands:
sudo apt update
sudo apt upgrade -y
sudo apt full-upgrade -y
sudo apt autoremove --purge -ybashThis step is essential because it resolves minor bugs and security issues, laying the groundwork for a smooth upgrade. Make sure your Bookworm system is fully updated before starting the transition to Trixie.
Step 5: Check held packages
Sometimes packages are placed on ‘hold’, which means they won’t be automatically updated even when new versions are available. These packages can cause problems during an upgrade by preventing dependencies from being resolved correctly. Use the following command to check whether any packages on your system are on ‘hold’:
apt-mark showholdbashIf that’s the case, you should release these packages to ensure the upgrade works smoothly:
sudo apt-mark unhold package namebashStep 6: Check third-party package sources
Over time, many users add extra package sources to their system, for example to install software not included in the official Debian archive. These additional sources are often the cause of problems during a Debian 13 upgrade. To avoid issues, review your list of package sources:
apt list '?narrow(?installed, ?not(?origin(Debian)))'bashTemporarily disable or remove any entries that are not part of Debian. For the upgrade process, it’s safest to rely only on official Debian packages.
Step 7: Switch the package sources to Debian 13
Once your system is prepared, the next step is to update the package sources from Debian 12 to Debian 13. These sources are defined in the file /etc/apt/sources.list and sometimes in additional files under /etc/apt/sources.list.d/. Open these files in a text editor and replace every instance of ‘bookworm’ with ‘trixie’. Be sure to update all entries so that every package is pulled from the new sources. Before making changes, create a backup of the original file so you can easily restore it if something goes wrong.
Step 8: Create a stable work environment
If you’re performing the upgrade on a remote server via SSH, there’s always a risk that your connection could drop during the process. In the worst case, this might leave the upgrade incomplete. To minimise this risk, use tools like screen or tmux. These programs provide a secondary session that keeps running in the background, even if your SSH connection is interrupted. In this example, we’ll use screen with the following commands:
sudo apt install screen -y
screen -S upgrade-sessionbashStep 9: Start minimal Debian 13 upgrade
After finishing the preparations, the next step is to perform a minimal upgrade. In this step, only packages that can be updated without major conflicts are upgraded. This reduces the risk of critical services suddenly failing. Once this initial upgrade is successfully completed, you can continue with the main upgrade. To begin the minimal Debian 13 upgrade, run the following command:
apt upgrade --without-new-pkgsbashStep 10: Perform the full upgrade
You can now proceed with the full upgrade. This is the crucial step where your Debian system transitions from version 12 to version 13. During this process, many packages will be downloaded, unpacked, and installed. The system may prompt you several times about how to handle specific configuration files. In most cases, it’s safe to accept the new version of the file as recommended. Start the Debian 13 upgrade with the following command:
apt full-upgradebashBe patient—this step can take a while, depending on the speed of your hardware and internet connection.
- 1 Gbit/s bandwidth & unlimited traffic
- Minimum 99.99% uptime & ISO-certified data centres
- 24/7 premium support with a personal consultant
Step 11: Restart with new kernel
The upgrade to Trixie usually includes a kernel update as well. It’s strongly recommended to have a linux-image- * metapackage installed (for example, linux-image-amd64 on AMD64 systems) to ensure that* future kernel updates are applied automatically*. You can check whether a metapackage is installed with the following command:
dpkg -l 'linux-image*' | grep ^ii | grep -i metabashIf a metapackage is not present, you can install one with the following command:
apt install linux-image-amd64bashAfter a kernel upgrade, you need to reboot for the new kernel to take effect. The release notes specifically state that a restart is usually required.
Step 12: Post-upgrade tasks and cleanup
Even if your system is running fine after the reboot, there are still a few cleanup tasks to complete. It’s best to remove unnecessary packages and old dependencies to keep your system lean and clean. Use apt autoremove for this purpose. In addition, outdated packages that are no longer needed after the Debian 13 upgrade should be removed. You can list and delete them with the following commands:
apt list '?obsolete'
apt purge '?obsolete'bashYou no longer need the configuration files of obsolete packages either:
apt list '?config-files'
apt purge '?config-files'bashYour system has now been successfully upgraded to Debian 13 (Trixie), and you can continue using it as usual. For example, you can install database management systems like PostgreSQL on Debian 13 or download and run other programs just as you normally would.

