Let's say you're using Ubuntu 13.04 (Raring Ringtail, released in April 2013) and it just went End-of-Life on you, because it's supported for only 6 months, and the deprecated packages are taken down after 12 months.
You'll probably figure this out the hard way. When you run sudo apt-get update
, it will eventually report these errors:
Ign http://archive.ubuntu.com raring-updates/universe Sources/DiffIndex
Err http://security.ubuntu.com raring-security/main Sources
404 Not Found [IP: 91.189.91.15 80]
Err http://security.ubuntu.com raring-security/universe Sources
404 Not Found [IP: 91.189.91.15 80]
Err http://security.ubuntu.com raring-security/main amd64 Packages
404 Not Found [IP: 91.189.91.15 80]
Ign http://archive.ubuntu.com raring-updates/main amd64 Packages/DiffIndex
Err http://security.ubuntu.com raring-security/universe amd64 Packages
404 Not Found [IP: 91.189.91.15 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/main/source/Sources 404 Not Found [IP: 91.189.91.15 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/universe/source/Sources 404 Not Found [IP: 91.189.91.15 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/main/binary-amd64/Packages 404 Not Found [IP: 91.189.91.15 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/universe/binary-amd64/Packages 404 Not Found [IP: 91.189.91.15 80]
Visiting http://archive.ubuntu.com/ubuntu/dists does confirm that raring packages are indeed gone, while lucid, precise, saucy, and trusty are still there, as per their promised support schedule.
Some googling reveals that they're not deleted, but simply moved to http://old-releases.ubuntu.com/ubuntu/dists/, sort of a graveyard for insecure and unsupported packages.
To make apt-get update
work, we simply need to edit /etc/apt/sources.list
and update all URLs from security.ubuntu.com
and archive.ubuntu.com
to point to old-releases.ubuntu.com
, as per the following sed command:
sudo sed -i.bak -r 's/(archive|security).ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
After this, sudo apt-get update
seems to run without a hitch. Of course if you do this, you're accepting to use an insecure system, and should do sudo apt-get install update-manager-core; do-release-upgrade
as soon as possible.
SOURCES:
Hi,
root@shai-pc:/etc/apt/sources.list.d# apt-get update
Err:1 http://us.old-releases.ubuntu.com/ubuntu disco InRelease
Could not resolve 'us.old-releases.ubuntu.com'
Err:2 http://us.old-releases.ubuntu.com/ubuntu disco-updates InRelease
Could not resolve 'us.old-releases.ubuntu.com'
Err:3 http://us.old-releases.ubuntu.com/ubuntu disco-backports InRelease
Could not resolve 'us.old-releases.ubuntu.com'
Get:4 http://old-releases.ubuntu.com/ubuntu disco-security InRelease [97.5 kB]
Get:5 http://old-releases.ubuntu.com/ubuntu disco-security/main i386 Packages [176 kB]
Get:6 http://old-releases.ubuntu.com/ubuntu disco-security/main amd64 Packages [188 kB]
Get:7 http://old-releases.ubuntu.com/ubuntu disco-security/main Translation-en [77.3 kB]
Get:8 http://old-releases.ubuntu.com/ubuntu disco-security/main amd64 DEP-11 Metadata [37.6 kB]
Get:9 http://old-releases.ubuntu.com/ubuntu disco-security/main DEP-11 48x48 Icons [12.9 kB]
Get:10 http://old-releases.ubuntu.com/ubuntu disco-security/main DEP-11 64x64 Icons [27.4 kB]
Get:11 http://old-releases.ubuntu.com/ubuntu disco-security/main amd64 c-n-f Metadata [5,000 B]
Get:12 http://old-releases.ubuntu.com/ubuntu disco-security/restricted amd64 Packages [1,560 B]
Get:13 http://old-releases.ubuntu.com/ubuntu disco-security/restricted Translation-en [628 B]
Get:14 http://old-releases.ubuntu.com/ubuntu disco-security/restricted amd64 c-n-f Metadata [116 B]
Get:15 http://old-releases.ubuntu.com/ubuntu disco-security/universe i386 Packages [280 kB]
Get:16 http://old-releases.ubuntu.com/ubuntu disco-security/universe amd64 Packages [283 kB]
Get:17 http://old-releases.ubuntu.com/ubuntu disco-security/universe Translation-en [86.0 kB]
Get:18 http://old-releases.ubuntu.com/ubuntu disco-security/universe amd64 DEP-11 Metadata [19.9 kB]
Get:19 http://old-releases.ubuntu.com/ubuntu disco-security/universe DEP-11 48x48 Icons [14.3 kB]
Get:20 http://old-releases.ubuntu.com/ubuntu disco-security/universe DEP-11 64x64 Icons [49.7 kB]
Get:21 http://old-releases.ubuntu.com/ubuntu disco-security/universe amd64 c-n-f Metadata [6,652 B]
Get:22 http://old-releases.ubuntu.com/ubuntu disco-security/multiverse i386 Packages [1,624 B]
Get:23 http://old-releases.ubuntu.com/ubuntu disco-security/multiverse amd64 Packages [1,460 B]
Get:24 http://old-releases.ubuntu.com/ubuntu disco-security/multiverse Translation-en [1,000 B]
Get:25 http://old-releases.ubuntu.com/ubuntu disco-security/multiverse amd64 c-n-f Metadata [116 B]
Fetched 1,368 kB in 1s (1,018 kB/s)
Reading package lists... Done
W: Failed to fetch http://us.old-releases.ubuntu.com/ubuntu/dists/disco/InRelease Could not resolve 'us.old-releases.ubuntu.com'
W: Failed to fetch http://us.old-releases.ubuntu.com/ubuntu/dists/disco-updates/InRelease Could not resolve 'us.old-releases.ubuntu.com'
W: Failed to fetch http://us.old-releases.ubuntu.com/ubuntu/dists/disco-backports/InRelease Could not resolve 'us.old-releases.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
i update the sources.list url hostname to old-releases but still not working what to do?