Start a Powershell terminal
List the running instances:
wsl --list
Terminate the Debian instance:
wsl --terminate Debian
Take a backup:
wsl --export Debian C:\Users\Public\debian-backup.tar
Update wsl and then start Debian
wsl --update
wsl -d Debian
Install all updates for the current version:
sudo apt update
sudo apt full-upgrade -y
sudo apt autoremove --purge
Update the source list from the previous codename (bookworm) with trixie (for Debian 13):
sudo sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
Run the minimum upgrade first:
sudo apt update
sudo apt upgrade --without-new-pkgs
Answer Yes when prompted; to install and restart services.
Run the full upgrade next:
sudo apt full-upgrade
exit
Restart the instance from the Terminal
wsl --terminate Debian
wsl -d Debian
Cleanup files from the previous version:
sudo apt autoremove --purge -y
sudo apt clean
Confirm the OS version:
cat /etc/os-release