Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
FREEDOM251

Freedom251 › Blog › APT

How to Upgrade Debian 12 Bookworm to Debian 13 Trixie Safely

By Freedom251 Team · · 10 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Short answer: upgrade only a fully updated Debian 12 (Bookworm) installation, make a recoverable backup, disable or reconcile third-party repositories, change every Debian archive entry to Debian 13 (Trixie), and run the APT transaction interactively in two stages. Expect service interruptions and schedule a reboot because the kernel is upgraded.

Debian 13 “Trixie” was released on 2025-08-09. Debian says APT handles upgrades from Debian 12 automatically for most configurations, but that does not make an unprepared or mixed-repository system safe. The procedure below follows the Debian Documentation Project’s upgrade guidance, whose release-notes page was updated on 2026-08-23.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Define a safe starting point

Debian’s documented procedure is intended for a “pure” Debian system: packages should come from Debian repositories rather than a mixture of unofficial archives, vendor repositories and partially pinned releases. The supported starting release for this path is Debian 12 Bookworm, brought to its latest point release with no pending package actions.

Verify the installed release before editing anything:

cat /etc/debian_version

The result should identify a Debian 12 release. If it shows another major release, stop and use the upgrade path written for that release instead. A machine with unresolved actions in APT, aptitude or Synaptic is not ready; finish those actions while the system still uses Bookworm sources.

Preflight checklist

  • Confirm the host is Debian 12 Bookworm and has been updated to the latest available Bookworm point release.
  • Resolve interrupted installations, held configuration prompts and other pending work in APT, aptitude or Synaptic.
  • Make sure every filesystem needed by the package manager is mounted read-write.
  • Arrange a maintenance window and a way to reach the machine if its network service is down during the upgrade.
  • Inventory software that depends on external repositories, locally built packages or special kernel modules; these are the components most likely to need attention after the release change.

Do not begin merely because the command is available. Debian’s release notes explicitly say, “Before starting the upgrade you must reconfigure APT to add sources for trixie and typically remove sources for bookworm.”

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Make a backup you can actually restore

An in-place release upgrade changes package files, service configuration and dependency state. A hardware failure during the transaction can damage the installation, so a backup kept on the same disk is not sufficient protection. Store the backup on separate, recoverable media or in a backup system that supports your Debian environment, and verify that you can read the files before proceeding.

At minimum, preserve the following package and configuration state:

Item Why it matters
/etc System and service configuration, including network, authentication and repository settings.
/var/lib/dpkg dpkg’s database of installed packages and their state.
/var/lib/apt/extended_states APT’s record of automatically installed packages and related decisions.
Output of dpkg --get-selections '*' A restorable record of package selections.
/var/lib/aptitude/pkgstates Required when aptitude is used, because it stores aptitude-specific package state.
/home User data; back it up or unmount it as an additional precaution.

Capture the package-selection list from a root shell, for example:

sudo -i
dpkg --get-selections '*' > /root/dpkg-selections-bookworm.txt
exit

Use your normal backup tooling for the directories, preserving ownership, permissions, symbolic links and extended attributes where your applications require them. Keep a written note of where the backup is stored and how to boot or mount it independently of the system being upgraded. A backup that has never been restored is only an assumption, not a rollback plan.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Audit repositories and remove upgrade blockers

Third-party repositories are the most common reason a nominally simple upgrade becomes a dependency problem. Before changing suites, inspect the main source file and every file under /etc/apt/sources.list.d/. Look for vendor archives, locally added mirrors, pinning files and old entries that are no longer used.

grep -R --line-number --no-messages '' /etc/apt/sources.list /etc/apt/sources.list.d/

Disable unofficial repositories for the duration of the release upgrade unless their publisher provides a Trixie-compatible path and you have a specific reason to keep them enabled. Disabling an entry means removing it from APT’s active configuration, not deleting the only copy of a repository definition you may need later; save a copy outside the active directory if necessary.

Handle Bookworm backports deliberately

Normal Bookworm backports can sometimes be carried forward, but Debian describes that route as less tested than upgrading the base system without them. “Sloppy” Bookworm backports—packages pulled from backports without a clean dependency path—have no clean upgrade path and should be removed before the upgrade starts. If you cannot identify which installed packages depend on a backport, treat that uncertainty as a reason to stop and resolve it while Bookworm is still running.

After this audit, leave one coherent set of Debian sources enabled. Do not rely on APT to sort out a mixture of Bookworm and Trixie archives during a major transaction.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Convert Debian APT sources to Trixie

Save the current APT source files before editing them. Then convert Debian archive entries consistently: change the suite from Bookworm to Trixie, disable the old Bookworm lines, and keep components, architectures and signing-key references aligned across all active files. Debian recommends consolidating the Debian entries in a single deb822 file at /etc/apt/sources.list.d/debian.sources instead of leaving a collection of old-style .list files.

A deb822 file can follow this pattern:

Types: deb
URIs: https://deb.debian.org/debian
Suites: trixie trixie-updates
Components: main non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

This is a pattern, not a universal copy-and-paste configuration. Check the mirror you use, the components your installation needs, the architectures you actually install and the current security repository entry against Debian’s Trixie release notes. If your system uses a separate security archive, convert that entry to the Trixie form as well.

Rules that prevent mixed-release upgrades

  • Do not leave active Bookworm entries in /etc/apt/sources.list or any file in /etc/apt/sources.list.d/ after conversion.
  • Do not change only one of several duplicate Debian definitions; APT reads all enabled files.
  • Keep Suites, Components, architecture restrictions and Signed-By references internally consistent.
  • Do not bypass signature checks to make a mirror error disappear.
  • Use a mixed Bookworm/Trixie configuration only as a temporary troubleshooting measure explicitly described by Debian, never as the normal upgrade state.

Run a metadata refresh after the edit and read the output. An error about an unknown suite, missing Release file, invalid signature or an unexpected Bookworm archive is a stop sign; fix the source files before installing anything.

sudo apt update

Run the upgrade as a staged, interactive transaction

Keep the required filesystems mounted read-write and use a local console or a remote session that will remain available for the entire transaction. A terminal multiplexer is sensible for a remote machine, but it does not remove the need for an out-of-band recovery method.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Debian’s sequence is deliberately staged. First refresh package metadata and perform the minimal upgrade; then complete the distribution upgrade with apt full-upgrade:

  1. Refresh metadata.
    sudo apt update
  2. Perform the minimal upgrade.
    sudo apt upgrade --without-new-pkgs
  3. Complete the distribution upgrade.
    sudo apt full-upgrade

Run these commands interactively. Read the proposed removals, newly installed packages and configuration-file prompts instead of accepting them blindly. A package removal list that includes software you still need, or a sudden plan to remove a large part of the desktop or server stack, usually indicates an inconsistent source file, an obsolete third-party package or a backport conflict. Cancel, correct the cause and run the transaction again rather than forcing the removal.

The apt command is designed for interactive use. Scripts should use apt-get instead, but scripting a major release change removes the review points that make this procedure safer. Do not close the session while dpkg is unpacking or configuring packages, and do not interrupt power to the machine.

Keep an upgrade record

APT records package history in /var/log/apt/history.log, terminal output in /var/log/apt/term.log, and dpkg state changes in /var/log/dpkg.log. Preserve these logs with your backup or copy them to your administration system after the transaction. They are the fastest way to identify which package was being unpacked or configured if a service fails later.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Plan for downtime and the required reboot

Package replacement is not a zero-downtime operation. Services associated with upgraded packages can stop while files are replaced and configured. A prompt that is left unanswered can keep a service unavailable for a significant period, so schedule the work as maintenance rather than attempting it during an unstaffed production window.

The kernel is upgraded as part of the move to Trixie. Debian’s release notes are explicit: “You will have to do a kernel upgrade when upgrading to trixie, so a reboot will be necessary.” Reboot only after the package transaction completes successfully and any configuration prompts have been handled:

sudo reboot

After the machine returns, verify the release and then check the services that matter to its role:

  • Network connectivity, DNS and the expected interface addresses.
  • Storage mounts, RAID or volume-manager devices and filesystem health.
  • Authentication, SSH or console access and any directory-service integration.
  • Scheduled jobs, timers and backup agents.
  • Application services, listeners, queues and web endpoints.

For a remote server, keep console access available until these checks pass. A successful APT command is not proof that an application is reachable or that a custom driver survived the kernel change.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Clean up only after Trixie is healthy

Once the rebooted system is working, inspect packages that are now redundant or obsolete. Review their configuration files before removing them; deleting a package does not automatically mean its configuration is safe to discard. Use APT’s normal removal and autoremove operations only after you understand the proposed list.

Inspect the source directory again. If old-style source files remain, use Debian’s APT source-modernization facility to convert them, then remove duplicate or disabled definitions that no longer serve a purpose. Update Signed-By references to Debian’s canonical .pgp keyring names when practical; the older .gpg names are compatibility links, so changing them is modernization rather than an emergency repair.

Do not add Trixie backports during the same recovery window. Add them only after the base Trixie system, its services and its backups are demonstrably healthy, and only for software that needs them.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What to do when the upgrade does not look right

APT still reports Bookworm packages

Stop the transaction and inspect every active source file, including files you did not edit under /etc/apt/sources.list.d/. Disable the remaining Bookworm or third-party entries, refresh metadata and review the candidate versions before continuing. Do not “solve” the warning by mixing suites indefinitely.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A third-party package creates removal conflicts

Cancel the proposed transaction, disable the repository and determine whether the package has a Trixie build. If it is not essential, remove it while Bookworm is still intact or arrange a supported replacement. Re-running full-upgrade without resolving the dependency source will not make the conflict safer.

The transaction was interrupted after unpacking packages

Do not reboot repeatedly or delete package databases. Preserve the APT and dpkg logs, restore network access if it was lost, and finish the package configuration from a root shell:

sudo dpkg --configure -a
sudo apt -f install

Review every proposed change interactively. If these commands propose removing critical services, stop and use the logs to identify the package or repository that caused the inconsistency before proceeding.

A service is missing after reboot

Check the service’s package status, configuration-file prompts and the entries in /var/log/apt/term.log and /var/log/dpkg.log. Confirm that its data filesystem is mounted and that any external module or driver has a Trixie-compatible build. A package transaction can finish while an application remains disabled or unable to start; treat that as a service-recovery task, not evidence that another release upgrade is needed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

APT reports a mirror or signature error

Recheck the Trixie mirror URL, suite, components, architecture restrictions and Signed-By path against the current Debian release notes. Correct the source definition or keyring reference and run apt update again. Never disable signature verification to force the upgrade through.

In-place upgrade or fresh installation?

Debian documents the in-place APT path; it does not prescribe one universal fresh-install workflow. The choice depends on how much local customization and repository history the machine has.

Decision factor In-place APT upgrade Fresh installation
Backup and rollback Requires a recoverable backup; there is no automatic release-level rollback if the transaction goes wrong. Can provide a cleaner fallback if the old system or disk is preserved, but applications and data still need a verified restore.
Third-party repositories Must be audited, disabled or given a supported Trixie path before package resolution. Can start with only Debian sources, then add external repositories one at a time after the base install is stable.
Expected service downtime Includes the package transaction, service restarts and a kernel reboot. Includes installation, configuration and restoration, usually a longer planned outage for a populated server.
Hardware and drivers Existing hardware remains in place, but kernel modules and drivers still need validation after reboot. Hardware, storage, network and driver support must be revalidated against the fresh installation media and kernel.
Time to restore applications and data Usually less work when the installed packages and configuration remain compatible with Trixie. Requires reinstalling applications and restoring configuration and data, but removes accumulated package-state debris.

Choose the in-place path when the machine is a mostly pure Bookworm system, its backups are tested and you can provide a maintenance window. A fresh installation is often easier to control when the host has years of vendor repositories, locally modified packages or unclear dependency history, provided you have a tested restoration plan.

Final readiness checklist

  • Release: cat /etc/debian_version confirmed Debian 12 before the change and Debian 13 after the reboot.
  • State: Bookworm was fully updated and had no pending APT, aptitude or Synaptic actions.
  • Backup: /etc, dpkg and APT state, package selections and required user data are stored separately and readable.
  • Sources: Debian entries consistently target Trixie; old Bookworm and unsupported third-party entries are disabled.
  • Transaction: apt update, the minimal apt upgrade --without-new-pkgs and apt full-upgrade were run interactively, with removals and prompts reviewed.
  • Recovery: APT, terminal and dpkg logs were retained, and a console or other recovery path is available.
  • Aftercare: The kernel reboot completed, core services were tested, obsolete packages were reviewed and source files were modernized.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

APTBookwormDebianDebian 13Linux administrationsystem upgradeTrixie

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.