Update an old Ubuntu: 404 Not Found; Err http://us.archive.ubuntu.com; Failed to fetch

Today I stumbled into a weird problem. My Ubuntu server 9.04 couldn't update anymore. My /etc/apt/sources.list looked like this:

  deb-src http://archive.ubuntu.com/ubuntu/ jaunty main restricted universe multiverse

Running apt-get update gave all sorts of problems as it couldn't find repository servers anymore:

  $ sudo apt-get update
  Ign http://us.archive.ubuntu.com jaunty Release.gpg
  Ign http://us.archive.ubuntu.com jaunty Release
  Ign http://us.archive.ubuntu.com jaunty/main Packages
  Ign http://us.archive.ubuntu.com jaunty/universe Packages
  Ign http://us.archive.ubuntu.com jaunty/main Packages
  Ign http://us.archive.ubuntu.com jaunty/universe Packages
  Err http://us.archive.ubuntu.com jaunty/main Packages
    404 Not Found [IP: 80]
  Err http://us.archive.ubuntu.com jaunty/universe Packages
    404 Not Found [IP: 80]
  W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty/main/binary-i386/Packages
    404 Not Found [IP: 80]

  W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty/universe/binary-i386/Packages
    404 Not Found [IP: 80]

  E: Some index files failed to download, they have been ignored, or old ones used instead.

To upgrade a really old Ubuntu release, we first need to edit our sources.list and change all (xx.)archive.ubuntu.com to old-releases.ubuntu.com.

   $ sudo emacs /etc/apt/sources.list

So your lines should instead of

   deb http://archive.ubuntu.com/ubuntu jaunty main restricted universe

look like

   deb http://old-releases.ubuntu.com/ubuntu jaunty main restricted universe

In this example I use jaunty release. But it works the same on other releases.

Now update the repos

   $ sudo apt-get update

Install update-manager-core if it is not yet installed:

   $ sudo apt-get install update-manager-core

And now upgrade the system.

   $ sudo do-release-upgrade

Note that you can just upgrade to the next release (in my example from 9.04 to 9.10 or from LTS 8.04 to 10.04).

Also note that if upgrading over the ssh session it is advised to run the upgrade in the screen. If the ssh session drops, the upgrade will continue to run. Install screen first (if not yet installed)

   $ sudo apt-get install screen

Now run screen

   $ screen

And upgrade with

   $ sudo do-release-upgrade

How to work with the screen is beyond this post.

EDIT 14. 9. 2014:

As Dmitry has mentioned in the comments, security packages should also be replaced with old-releases. So:

security.ubuntu.... should be changed to old-releases.ubuntu....


Trackback specific URI for this entry

This link is not meant to be clicked. It contains the trackback URI for this entry. You can use this URI to send ping- & trackbacks from your own blog to this entry. To copy the link, right click and select "Copy Shortcut" in Internet Explorer or "Copy Link Location" in Mozilla.

No Trackbacks


Display comments as Linear | Threaded

Joey on :

Thanks so much for this post, you saved me hours of searching for a fix to my problems in Ubuntu 9.04!

mk on :

Glad it helped. It had taken me some time to find these repos.

Martin on :

Same here, got my 9.10 install working. Just need to get deDECTed working now :)

Henry on :

I recently rescued an old computer and installed ubuntu from an old USB. Nothing was working and I was stuck with this problem. Thank you very much!

David Hopkins on :

Thank you, sir. I have not been able to install any packages for maybe two years, but now most of the problems are fixed. I am using Linux Mint version 8 and this has solved most of the problems. There are however some problems with security updates/packages, which I am sure I will be able to fix.

Olga on :

Thanks a lot! It saved me a lot of time!

Brian De Itwiz on :

Thanks, this worked had tried several solutions but this did it.. Thanks a lot

Algar on :

You post helps me a lot. Thanks!

Dmitry Mozzherin on :

security.ubuntu.... also should be changed old-releases.ubuntu....

mk on :

Thx for the tip. I edited the post for others to see.

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.

Can you please write (or copy/paste) this text in the field below: i h a t e s p a m