Getting 404 not found errors when doing `sudo apt-get update`
To change all of your deprecated urls http://archive.ubuntu.com
to the working urls http://old-releases.ubuntu.com
sudo sed -i -e 's/:\/\/(archive.ubuntu.com\|security.ubuntu.com)/old-releases.ubuntu.com/g' /etc/apt/sources.list
This answer is based on https://smyl.es/how-to-fix-ubuntudebian-apt-get-404-not-found-package-repository-errors-saucy-raring-quantal-oneiric-natty/
Remove the line that reads deb http://archive.ubuntu.com/ubuntu main universe restricted multiverse
(and the commented line after that, if you wish). Then run sudo apt-get update
. There should be no errors now.
First run sudo apt-get -y upgrade
to get apt-get repointed correctly.
Then you can run such commands as:
sudo apt-get -y update
sudo apt-get -y dist-upgrade
without getting the "404 Not Found" error.