Skip to content

Instantly share code, notes, and snippets.

@wommy
Last active November 25, 2025 02:43
Show Gist options
  • Select an option

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

Select an option

Save wommy/f034e52312b7f1fd4330c25ad21dafee to your computer and use it in GitHub Desktop.
#!/bin/bash
## from https://backports.debian.org/Instructions/
## and Andrea Borman 's https://www.youtube.com/@AndreaBorman
## youtube video :: How To Update With Debian Backports On Debian Bookworm.
## https://www.youtube.com/watch?v=XDF2CB-q60M
sudo sed -i -E '
s/^(Suites:.*)(\s*)$/\1 trixie-backports\2/;
/^Components:/ s/main.*/main contrib non-free non-free-firmware/
' /etc/apt/sources.list.d/debian.sources
echo "Package: *
Pin: release a=stable-backports
Pin-Priority: 500" | sudo 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