Monday, May 1, 2017

apt - remove 8.04 repositories in 12.04?



after using ubuntu for about a year, it's time to pose my first question.
I am running ubuntu 12.04.3 and recently I've had some issues with resynchronizing the package index files.



sudo apt-get update produced these errors:



W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/hardy-security/main/source/Sources  404  Not Found
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/hardy-security/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/hardy-security/main/binary-i386/Packages 404 Not Found

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


A look at my /etc/apt/sources.list reveals the following:



# deb cdrom:[Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)]/ oneiric main restricted
# deb cdrom:[Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)]/ dists/oneiric/main/binary-i386/
deb http://security.ubuntu.com/ubuntu hardy-security main
deb-src http://security.ubuntu.com/ubuntu hardy-security main
deb http://archive.ubuntu.com/ubuntu precise main restricted

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

deb-src http://archive.ubuntu.com/ubuntu precise-updates multiverse
deb http://archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu precise-security main restricted
deb-src http://archive.ubuntu.com/ubuntu precise-security main restricted
deb http://archive.ubuntu.com/ubuntu precise-security universe
deb-src http://archive.ubuntu.com/ubuntu precise-security universe
deb http://archive.ubuntu.com/ubuntu precise-security multiverse
deb-src http://archive.ubuntu.com/ubuntu precise-security multiverse
deb http://extras.ubuntu.com/ubuntu precise main

deb-src http://extras.ubuntu.com/ubuntu precise main


Apparently, the file contains two Hardy repositories, which cause the problem, as Hardy has reached its EOF, as can be seen here.



I found two possible solutions to this problem:
1. change the url for the hardy repositories from http://security.ubuntu.com/ubuntu to http://old-releases.ubuntu.com/ubuntu (old releases server, source)
2. remove / replace the hardy repositories



So here are the questions for you:
1. which approach should I pursue? (I think the second one, as using outdated repositories isn't a good idea anyways, see e.g. here)
2. if I choose the second approach, can I simply delete the hardy-security repos (as the corresponding precise repos are already contained)? Is this procedure safe in terms of system stability?



Thanks in advance,
silvio




Delete the hardy lines. They're not needed. You already have modern precise versions of the -security repo so there's nothing else to do.



And yes, this should be perfectly safe. The repos are already not doing anything (they're 404ing so aren't contributing to the current available package list) and even if they were working, all its packages should have been superseded by more modern packages in precise-security.



I'd be curious to know how you ended up with hardy repos in your sources. Looks like you installed at Oneiric so this isn't a hangover from an original install… Very odd.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...