This is how I upgraded my elderly WSL Debian install from Buster (version 10) to Trixie (version 13). This may only apply to Windows Subsystem for Linux (WSL) running Debian, although it may help with others like Ubuntu. For a smoother upgrade I worked through the versions: Bullseye > Bookworm > Trixie as Debian is really only happy updating one version at a time.
Upgrading from Buster to Bullseye:
As Buster is now out of support, no updates are available.
|
1 2 3 4 5 6 |
sudo sed -i -e 's/buster/bullseye/g' /etc/apt/sources.list sudo apt update sudo apt full-upgrade -y sudo apt -y clean && sudo apt -y autoremove cat /etc/os-release sudo apt install usrmerge |
Going through each command, this changes the version in the sources.list file and after you update apt the database, we perform a full upgrade and then clean the old data. We then check the version with cat /etc/os-release.
Installing usrmerge resolves this error which can appear later:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
Preconfiguring packages ... (Reading database ... 33018 files and directories currently installed.) Preparing to unpack .../base-files_13.8+deb13u1_amd64.deb ... ****************************************************************************** * * The base-files package cannot be installed because * /bin is a directory, but should be a symbolic link. * * Please install the usrmerge package to convert this system to merged-/usr. * * For more information please read https://wiki.debian.org/UsrMerge. * ****************************************************************************** dpkg: error processing archive /var/cache/apt/archives/base-files_13.8+deb13u1_amd64.deb (--unpack): |
Upgrading from Bullseye to Bookworm:
The intermediate step, if you are already at Bullseye then:
|
1 2 |
sudo apt update sudo apt upgrade |
before embarking on the version upgrade.
|
1 2 3 4 5 |
sudo sed -i -e 's/bullseye/bookworm/g' /etc/apt/sources.list sudo apt update sudo apt full-upgrade -y sudo apt -y clean && sudo apt -y autoremove cat /etc/os-release |
Upgrading from Bookworm to Trixie:
And finally to Trixie using the same method as before, but with an update to how the sources are set out.
|
1 2 3 4 5 6 |
sudo sed -i -e 's/bookworm/trixie/g' /etc/apt/sources.list sudo apt update sudo apt full-upgrade -y sudo apt -y clean && sudo apt -y autoremove sudo apt modernize-sources cat /etc/os-release |
on one of my computers, the Nvidia drivers prevented the kernel upgrade:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
... Building module: Cleaning build area... unset ARCH; env NV_VERBOSE=1 make -j36 modules KERNEL_UNAME=6.12.43+deb13-amd64.....(bad exit status: 2) Error! Bad return status for module build on kernel: 6.12.43+deb13-amd64 (x86_64) Consult /var/lib/dkms/nvidia-current/535.54.03/build/make.log for more information. Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. ... dpkg: error processing package linux-headers-6.12.43+deb13-amd64 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-headers-amd64: linux-headers-amd64 depends on linux-headers-6.12.43+deb13-amd64 (= 6.12.43-1); however: Package linux-headers-6.12.43+deb13-amd64 is not configured yet. dpkg: error processing package linux-headers-amd64 (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: linux-image-6.12.43+deb13-amd64 linux-headers-6.12.43+deb13-amd64 linux-headers-amd64 Error: Sub-process /usr/bin/dpkg returned an error code (1) |
to fix this I removed the Nvidia driver for reinstallation later:
|
1 2 3 4 5 6 7 8 9 10 |
sudo apt remove --purge -y 'nvidia-*' dkms sudo apt remove --purge -y linux-image-6.12.43+deb13-amd64 / linux-headers-6.12.43+deb13-amd64 / linux-headers-amd64 / linux-image-amd64 sudo apt -f install -y sudo apt autoremove --purge -y sudo apt autoclean sudo apt update sudo apt full-upgrade -y |
The final installed version:
|
1 2 3 4 5 6 7 8 9 10 11 |
$ 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/" |
and the installed kernel:
|
1 2 |
$ uname -a Linux DebWSL 6.6.87.2-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025 x86_64 GNU/Linux |









