IT-LINUXMAKER, OpenSource, Tutorials

How to update Debian Linux 12 "Bookworm" to Debian Linux 13 "Trixie"?

At the time of this writing, Debian Bookworm is already the OldStable version, while Debian Trixie is already the stable version. Debian 13 Trixie was set to stable in August 2025.
However, the procedure from an oldstable version to a stable version in Debian Linux is always the same. This procedure should be recorded and documented here.

Bookworm Full Upgrade

First, we're doing a full full upgrade of the existing Debian Stable System - currently Bookworm, which can be a bit more up-to-date with you.

# apt-get update
# apt list --upgradable

This updates the package lists and displays available updates without installing them.

# apt-get -y upgrade
# apt-get -y dist-upgrade

This brings the current stable system up to date. You can also omit the option "-y", but you will then be asked interactively whether the actions should be carried out. The above chain of commands updates the information from the repositories, updates all packages, but does not delete one. The last command performs a system upgrade that allows both packages to be installed and deleted.

Prepare the Package Repository on Debian "Bookworm"

As already said, this statement can be applied to any Debian version, regardless of the versions "Bullseye" and "Bookworm". In the next step we prepare the /etc/apt/sources.list for the upgrade.

# sed -i 's/bookworm/trixie/g' /etc/apt/sources.list

After that, your /etc/apt/sources.list should look something like this:

deb http://deb.debian.org/debian trixie main non-free-firmware
deb-src http://deb.debian.org/debian trixie main non-free-firmware

deb http://deb.debian.org/debian-security/ trixie-security main non-free-firmware
deb-src http://deb.debian.org/debian-security/ trixie-security main non-free-firmware

deb http://deb.debian.org/debian trixie-updates main non-free-firmware
deb-src http://deb.debian.org/debian trixie-updates main non-free-firmware

Then we bring our system up to date with the Bookworm repository.

# apt-get update

System-Upgrade to Debian-Trixie

The following commands will upgrade your Debian 12 Bookworm to a Debian 13 Trixie.

# apt-get -y upgrade
# apt-get -y dist-upgrade

Check which Debian version is running on your Linux system

The easiest way to check which Debian version you are running is simply to read the contents of the /etc/issue file.

However, the above command does not show you the latest Debian upgrade versions. In the following example, the command already provides more detailed information:

# cat /etc/debian_version
13.1

In the next step, you can also look through the release file /etc/os-release:

# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
NAME="Debian GNU/Linux"
VERSION_ID="13"
VERSION="13 (trixie)"
VERSION_CODENAME=trixie 
DEBIAN_VERSION_FULL=13.1
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Another alternative is lsb_release, which may need to be installed first. Subsequently, this command also provides information about the Debian version on your Linux system.

# aptitude install lsb_release
#lsb_release -da
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 13 (trixie)
Release:       13
Codename:       trixie

For Debian versions that already use Systemd, you can also use hostnamectl:

#hostnamectl
   Static hostname: srv
         Icon name: computer-VM
           Chassis: vm
        Machine ID: 9e413e5b509343bc9a10c97172a75658
           Boot ID: 71224c76c174487abad3a9979a632ef4
  Operating System: Debian GNU/Linux 13 (trixie)
            Kernel: Linux 6.1.0-37-amd64
      Architecture: x86-64


IT-LINUXMAKER, OpenSource, IT-Support, IT-Consulting

© IT-LINUXMAKER 2025