Fix apt-get update error Failed to fetch 404 without dist-upgrade

  02 Sep 2014

The proper and straight forward solution is to upgrade to a recent version by:

sudo apt-get dist-upgrade

But, doing dist-upgrade is too risky for some people. Because they might still be considering for any side effect, preparing for upgrade etc. And they might not want to upgrade now.

Luckily, there is a workaround to solve this by using the new location for the old package repository, which is located at

I write a script below and you could run it on your server and it will replace all of the repository urls that are pointed to ‘’ or ‘’ by ‘’

You could download the above script and run as executable by:

curl -O
sudo chmod +x

Without manually editing files.

comments powered by Disqus