Skip to content

Instantly share code, notes, and snippets.

@wommy
Created December 2, 2025 18:13
Show Gist options
  • Select an option

  • Save wommy/8c8c54c8e0687532ee488dfea15121e2 to your computer and use it in GitHub Desktop.

Select an option

Save wommy/8c8c54c8e0687532ee488dfea15121e2 to your computer and use it in GitHub Desktop.
upgrade bookworm to trixie
## from https://linuxiac.com/how-to-upgrade-to-debian-13-trixie-from-12-bookworm/
## but a personalized variant
apt update ; apt upgrade -y
sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
sed -i 's/contrib/contrib non-free non-free-firmware/g' /etc/apt/sources.list
apt update ; apt upgrade --without-new-pkgs -y ; apt full-upgrade -y ; apt modernize-sources
echo "# Modernized from /etc/apt/sources.list
Types: deb
URIs: http://deb.debian.org/debian/
Suites: trixie trixie-updates trixie-backports
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
# Modernized from /etc/apt/sources.list
Types: deb
URIs: http://security.debian.org/
Suites: trixie-security
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg" | tee /etc/apt/sources.list.d/debian.sources
echo "Package: *
Pin: release a=stable-backports
Pin-Priority: 500" | tee /etc/apt/preferences.d/99-backports_stable-priority
apt update ; apt upgrade -y ; apt autoremove -y ; reboot
@wommy
Copy link
Author

wommy commented Dec 10, 2025

sed -i -e 's/updates/updates trixie-backports/' /etc/apt/sources.list.d/debian.sources

echo "Package: *
Pin: release a=stable-backports
Pin-Priority: 500" | tee /etc/apt/preferences.d/99-backports_stable-priority

apt update ; apt upgrade -y ; apt autoremove -y

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment