Skip to content

Instantly share code, notes, and snippets.

@TimJDFletcher
Last active August 22, 2019 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TimJDFletcher/b0268a83aa52b4c1868c7b0fc0a07770 to your computer and use it in GitHub Desktop.
Save TimJDFletcher/b0268a83aa52b4c1868c7b0fc0a07770 to your computer and use it in GitHub Desktop.
Upgrade from Stretch to Buster
#!/bin/bash
set -eux -o pipefail
# Bug fixes
sudo rm -f /etc/apt/apt.conf.d/99rpimonitor
# Replace stretch with buster in all source lists
sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/* /etc/apt/sources.list
# Run the upgrade
sudo apt-get update
sudo apt-get --yes dist-upgrade
# Remove unneeded packages
sudo apt-get update
sudo apt-get --yes autoremove
# Remove orphan packages
sudo aptitude purge ~o
sudo apt-get --yes install deborphan
deborphan --guess-all | xargs sudo apt-get --yes remove
sudo apt-get autoremove
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment