Skip to content

Instantly share code, notes, and snippets.

@keeler
Created December 19, 2020 18:55
Show Gist options
  • Save keeler/6d9f63b8d141f769f833af6bf49a694e to your computer and use it in GitHub Desktop.
Save keeler/6d9f63b8d141f769f833af6bf49a694e to your computer and use it in GitHub Desktop.
Address apt-get error 'The repository no longer has a release file'
# Happens when you didn't update to latest ubuntu when you should have.
# For shame. Here's how to fix.
# Credit to: https:digitalocean.com/community/questions/unable-to-apt-update-my-ubuntu-19-04
cp /etc/apt/sources.list ~/sources.list.bak
sudo sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sudo apt-get update && sudo apt-get dist-upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment