Upgrading from Debian 12 Bookworm to Debian 13 Trixie: Linux Upgrade Guide

The transition from Debian 12 Bookworm to Debian 13 Trixie marks a major milestone in the evolution of one of the most popular GNU/Linux distributions, renowned for its robustness and stability. With this upgrade, users benefit from an optimized environment thanks to the integration of the Linux 6.12 LTS kernel, new features, and extended support until 2030. Whether for workstations, servers, or virtual machines, this transition must be approached methodically and with careful preparation to avoid any inconvenience during the upgrade. System administrators, developers, and open source enthusiasts will find in this practical guide the tips, steps, essential commands, and pitfalls to avoid to successfully complete this migration with confidence. Understanding the challenges of the transition from Debian 12 Bookworm to Debian 13 Trixie: What’s New and Technical Context

Debian remains a benchmark in the Linux world thanks to its well-calibrated release cycle, with a new stable version approximately every two years. In August 2025, the official release of Debian 13 Trixie replaced Debian 12 Bookworm, bringing not only an update of thousands of packages, but also a profound modernization including the Linux 6.12 LTS kernel. This kernel, as detailed on

linuxencaja.net , brings significant advances in terms of performance and hardware compatibility. The Trixie release is also a milestone for the Linux world, as it marks an evolution of the APT source format with the introduction of the deb822 format, thus modernizing repository management.Furthermore, Debian 13 consolidates support for 64-bit architectures, with very limited, if not non-existent, support for 32-bit. This technical focus aims to strengthen security, performance, and consistency across the entire system. With approximately five years of LTS support, Debian 13 offers a stable horizon that will appeal to mission-critical servers as well as desktop environments under GNOME, KDE, or XFCE.

The improvements don’t stop at the kernel; the update also includes revised versions of Systemd, OpenSSL, and improvements to graphical environments. For example, GNOME and KDE now benefit from better session management and memory consumption, improving usability for end users. Boot management via Grub has also been optimized to ensure fast and secure startup.

Extended support

  • until 2030, ensuring long-term stability. Linux kernel 6.12 LTS, guaranteeing improved performance and better hardware compatibility. Deprecation of 32-bit systems
  • in favor of more robust 64-bit architectures.Modernization of APT repositories
  • with the deb822 format. Important updates
  • to Systemd, OpenSSL, and boot management with Grub. These changes highlight the need for meticulous preparation before any upgrade. A common mistake is to approach the migration without first verifying third-party packages, or without a complete backup, which can lead to service interruptions that are difficult to manage. For more information on advanced Linux management, the tips offered on linuxencaja.net can be very informative.
  • Preparing to Upgrade from Debian 12 to 13: Backup and Essential Checks Before migrating from Debian 12 Bookworm to Debian 13 Trixie, a crucial aspect is a complete backup of data and configurations. The goal is to protect against any unexpected failures that may occur during the upgrade. Several strategies are recommended depending on the environment:

Virtual machines : A snapshot or full clone of the VM provides a fast and reliable recovery method. Physical servers

: A disk image via Clonezilla or UrBackup protects against accidental partition loss.

Targeted backup with tar

  • : Create a compressed archive of sensitive directories such as /etc (system configurations), /home (user data), /root (administrative data), and /var/spool/cron (scheduled tasks).A concrete example of a tar backup also includes the list of installed packages using the command:
  • dpkg –get-selections > ~/packages.listThis approach ensures the ability to rebuild the software environment if necessary. The tar command to generate a complete archive before updating will then be:
  • sudo tar –ignore-failed-read -czpvf /root/backup-before-upgrade-$(date +%F).tar.gz–exclude=’/home/*/.cache’

–exclude=’/home/*/.local/share/Trash’

<!– wp:code {"content":"
dpkg --get-selections > ~/packages.list
“} –>
--exclude='/var/cache'

–exclude=’/var/tmp’

<!– wp:code {"content":"
sudo tar --ignore-failed-read -czpvf /root/backup-before-upgrade-$(date +%F).tar.gz n  --exclude='/home/*/.cache' n  --exclude='/home/*/.local/share/Trash' n  --exclude='/var/cache' n  --exclude='/var/tmp' n  --exclude='/tmp' n  /etc /home /root /var/spool/cron /var/lib/dpkg /var/lib/apt/extended_states
“} –>
--exclude='/tmp' 
  /etc /home /root /var/spool/cron /var/lib/dpkg /var/lib/apt/extended_states 
  After creating the archive, it is essential to transfer it to a secure medium (external drive, NAS, or cloud). This ensures rapid recovery even in the event of a serious incident. This step is essential, as can be seen in any serious migration, especially for systems using graphical environments like GNOME or KDE, which may contain valuable custom configurations. 
  Beyond the data, it is also advisable to check the exact version of Debian installed before upgrading. The following command provides this information: 
  lsb_release -a 
  This displays the current distribution in detail, confirming that you are indeed working with Debian 12 Bookworm. To refine this information, the command 
  cat /etc/debian_version

gives the minor version, for example, 12.11, indicating that the system is fully up-to-date.

Managing APT and Third-Party Packages When Migrating from Debian 12 to 13

<!– wp:code {"content":"
lsb_release -a
“} –>
Package management via APT is central to the Debian upgrade. Careful verification of installed packages, especially those from third-party repositories or manually installed, ensures a smooth transition. The following command can identify these packages outside official repositories:

sudo apt list ‘?narrow(?installed, ?not(?origin(Debian)))’ This report can include important packages like Docker or specific tools installed via external .deb files, or custom repositories located in /etc/apt/sources.list.d/

. For each:

Evaluate whether it is necessary to remove them before migration, with a targeted reinstallation later.

<!– wp:code {"content":"
sudo apt list '?narrow(?installed, ?not(?origin(Debian)))'
“} –>
Or decide to keep them if they are compatible with Debian 13, thus avoiding additional work.

For sensitive packages, use the command sudo apt-mark hold to temporarily block their update. It’s important to have a clear list of held packages before proceeding to avoid any critical blocks during the upgrade:

  • sudo apt-mark showhold
  • The goal is to remove these holds, if possible, according to the official Debian recommendation, so that the upgrade process runs without interruption.
  • Finally, a key step is to modify the APT sources to point to the Debian 13 Trixie repositories. Rather than manually editing the files, /etc/apt/sources.list and those in the /etc/apt/sources.list.d/ folder, the sed command makes this easier:

sudo sed -i ‘s/bookworm/trixie/g’ /etc/apt/sources.list /etc/apt/sources.list.d/*

<!– wp:code {"content":"
sudo apt-mark showhold
“} –>
This automatic replacement ensures that all source files now point to the future version. Debian 13 also introduces the non-free-firmware repository, intended for proprietary firmware required for certain hardware, particularly those related to NVIDIA drivers or other peripherals that are not compatible with the strict Debian Free Software Guidelines (DFSG).

List and manage third-party packages to avoid conflicts and errors during the upgrade.

Disable holds on packages essential for the upgrade. Automate the modification of repositories to point to Trixie with robust shell commands. To learn more about package management and securing Linux environments, here's a helpful article on optimizing and managing repositories on linuxencaja.net. Detailed Procedures for Upgrading from Debian 12 to Debian 13 With all the preparations in place, the actual upgrade begins. The process is simple, but requires patience, as several gigabytes can be downloaded and installed. The upgrade should be performed in the following precise order, on a system with no significant load:Refresh the package list

<!– wp:code {"content":"
sudo sed -i 's/bookworm/trixie/g' /etc/apt/sources.list /etc/apt/sources.list.d/*
“} –>
so that APT is aware of the new software:

sudo apt-get update Start the full upgradeto Debian 13 versions while monitoring dependencies:

  • sudo apt-get dist-upgrade –autoremove -y This command upgrades packages to Trixie and automatically removes old, obsolete packages. It is essential to wait for the process to complete without interrupting it. In the event of a problem, certain services such as systemd or the X server in GNOME, KDE, or XFCE environments may be temporarily affected, requiring a reboot.
  • Once the procedure is complete, reboot the machine: sudo reboot
  • After rebooting, confirm that the migration was successful with: lsb_release -a

The terminal should display: Distributor ID: DebianDescription: Debian GNU/Linux 13 (trixie)

Release: 13

Codename: trixie

  1. This confirmation marks the successful transition. https://www.youtube.com/watch?v=UklxKvXoRYc
<!– wp:code {"content":"
sudo apt-get update
“} –>
For those who prefer video support, this YouTube resource also explains each important step in detail, from backups to post-installation cleanup. Clean and optimize the system after the upgrade
  1. It’s essential not to neglect the post-migration process. A clean system prevents crashes and frees up disk space. Three essential commands facilitate this cleanup: Removing orphaned packages:
<!– wp:code {"content":"
sudo apt-get dist-upgrade --autoremove -y
“} –>
sudo apt autoremove --purge

Removing obsolete packages not present in the repositories:

sudo apt purge ‘~o’

<!– wp:code {"content":"
sudo reboot
“} –>
Cleaning the APT cache:

sudo apt autoclean

<!– wp:code {"content":"
lsb_release -a
“} –>
These commands, especially the first two, can first be run with the

-s

<!– wp:code {"content":"
Distributor ID:tDebiannDescription:tDebian GNU/Linux 13 (trixie)nRelease:t13nCodename:ttrixie
“} –>
(simulation) option to check the list of proposed removals. They avoid removing a third-party package that is temporarily no longer recognized because its repository has not yet been updated.
Finally, Debian 13 introduces the
apt modernize-sources
command, which converts classic

sources.list

files to the new deb822 format. This transition improves the clarity, security, and manageability of APT sources:

sudo apt modernize-sources

Once validated, this step finalizes the repository update. The old files are saved with the .bak extension in case a rollback is necessary.

  • Anticipating Challenges and Leveraging Improvements in Debian 13 The migration to Debian 13 Trixie isn’t just a logical update to APT or the kernel. It opens the door to a more secure, performant Linux environment that’s compatible with future technologies. For example, Systemd has integrated startup optimizations and improved service management to facilitate maintenance and monitoring. OpenSSL, for its part, benefits from a critical update in Debian 13 that strengthens the security of network communications.
<!– wp:code {"content":"
sudo apt autoremove --purge
“} –>
A successful migration also involves addressing changes in the management of popular graphical interfaces. GNOME, KDE, and XFCE have been updated to offer a host of improvements in terms of usability and system integration, including power management, notifications, and peripheral connectivity. These developments are detailed in various resources, notably on linuxencaja.net, which also covers the broader Linux ecosystem and its current challenges.
  • Expanded support for new hardware and software technologies.
<!– wp:code {"content":"
sudo apt purge '~o'
“} –>
Optimized boot via Systemd for reduced access time.
  • Strengthened network security thanks to OpenSSL updates.
<!– wp:code {"content":"
sudo apt autoclean
“} –>
Smoother and more stable graphical environments (GNOME, KDE, XFCE).

Finally, if you have older or overloaded hardware, it’s recommended to check out tips for revitalizing your Linux system, for example, with these practical and modern tips on linuxencaja.net. For curious users, improved Docker container management in Debian 13 allows for more efficient and secure deployments in virtualized environments.

<!– wp:code {"content":"
sudo apt modernize-sources
“} –>