Skip to content

Instantly share code, notes, and snippets.

@codecakes
Created January 17, 2018 07:22
Show Gist options
  • Save codecakes/ec799441cc694497d80d5d0a45c07963 to your computer and use it in GitHub Desktop.
Save codecakes/ec799441cc694497d80d5d0a45c07963 to your computer and use it in GitHub Desktop.
restores backed up repo and keys from older ubuntu packages and adds new versions packages
OLD="saucy\|precise\|zesty\|trusty\|raring\|xenial"
NEW="bionic"
OLD_SOURCES="./sources.list*"
find $OLD_SOURCES -type f -print0 | xargs -0 sed -i "s/$OLD/$NEW/gi"
sudo cp -R ./sources.list* /etc/apt/
sudo apt-get update
sudo apt-get install dselect
sudo dselect update
sudo apt-cache dumpavail > ~/temp_avail
sudo dpkg --merge-avail ~/temp_avail
sudo rm -rf ~/temp_avail
#sudo dpkg --set-selections < ~/Package.list
sudo apt-get dselect-upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment