Linux – Updating the url list apt-get uses in debian

aptitudedebianlinux

When I do 'apt-get update' on my VPS I get a lot of error messages:

Err http://ftp.debian.org lenny/volatile/main Packages
  404 Not Found [IP: 130.89.149.226 80]
Err http://ftp.debian.org lenny/volatile/contrib Packages
  404 Not Found [IP: 130.89.149.226 80]
Err http://ftp.debian.org lenny/volatile/non-free Packages
  404 Not Found [IP: 130.89.149.226 80]
Err http://ftp.debian.org lenny/updates/main Packages
  404 Not Found [IP: 130.89.149.226 80]
Err http://ftp.debian.org lenny/updates/contrib Packages
  404 Not Found [IP: 130.89.149.226 80]
Err http://ftp.debian.org lenny/updates/non-free Packages
  404 Not Found [IP: 130.89.149.226 80]
W: Failed to fetch http://ftp.debian.org/debian-volatile/dists/lenny/volatile/main/binary-i386/Packages  404 Not Found [IP: 130.89.149.226 80]

W: Failed to fetch http://ftp.debian.org/debian-volatile/dists/lenny/volatile/contrib/binary-i386/Packages  404 Not Found [IP: 130.89.149.226 80]

W: Failed to fetch http://ftp.debian.org/debian-volatile/dists/lenny/volatile/non-free/binary-i386/Packages  404 Not Found [IP: 130.89.149.226 80]

W: Failed to fetch http://ftp.debian.org/debian-security/dists/lenny/updates/main/binary-i386/Packages  404 Not Found [IP: 130.89.149.226 80]

W: Failed to fetch http://ftp.debian.org/debian-security/dists/lenny/updates/contrib/binary-i386/Packages  404 Not Found [IP: 130.89.149.226 80]

W: Failed to fetch http://ftp.debian.org/debian-security/dists/lenny/updates/non-free/binary-i386/Packages  404 Not Found [IP: 130.89.149.226 80]

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

Can anyone help me update this list to make all the urls work.

Sorry for the strange title of the question but I do not know the right terms.

Best Answer

The file you are looking for is /etc/apt/sources.list.

Chances are your host is using one of the older OpenVZ templates which had bad repo URLs.

Try my list:

deb http://security.debian.org/ lenny/updates main contrib non-free
deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free 
deb http://ftp.us.debian.org/debian/ lenny main
deb-src http://ftp.us.debian.org/debian/ lenny main
deb-src http://security.debian.org/ lenny/updates main
deb-src http://volatile.debian.org/debian-volatile lenny/volatile main
Related Question