Skip to content

Instantly share code, notes, and snippets.

@zdk
Created September 2, 2014 08:31
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 zdk/875c9fdf3ef588b2e792 to your computer and use it in GitHub Desktop.
Save zdk/875c9fdf3ef588b2e792 to your computer and use it in GitHub Desktop.
Resolve old release apt-get 404 error
#Replace package repository urls that are pointed to 'archive.ubuntu.com' or 'security.ubuntu.com' by 'old-releases.ubuntu.com'
grep -srlE 'archive.ubuntu.com|security.ubuntu.com' /etc/apt/* | xargs sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g'
#Then, update from new source lists.
sudo apt-get update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment