wheezy-updates on archive.debian.org returns 404 Not Found

Solution 1:

Using the Debian archive you shouldn't have an apt source line referring to wheezy-updates. This particular (sub-)distribution is not existing in the archives.

If you just remove the lines:

deb http://security.debian.org/ wheezy/updates main
deb http://ftp.fr.debian.org/debian wheezy-updates main

you should be able to run your apt-get commands again.

The whole story

The wheezy-updates repository contained packages that were provided to update the main repository, i.e. wheezy, between minor releases. Over time, when Wheezy got updated to 7.1, 7.2 and eventually to 7.11, the packages contained in wheezy-updates were moved into the main Wheezy repository. When Wheezy got EOLed, in May 2018, no packages were being kept in wheezy-updates, so there was no point in moving wheezy-updates to the Debian archive.

You can see the list of all Debian distributions supported by the archive repository at: http://archive.debian.org/debian/dists/ Also check the README files at http://archive.debian.org/README and http://archive.debian.org/debian/README to have an even fuller list of the archive content.

With regards to the security.debian.org repository, it is archived as well at http://archive.debian.org/debian-security/ If you want to fetch the very last updates, dating from May 2018, that were published for Wheezy, you can also add this line to your apt sources:

deb http://archive.debian.org/debian-security/ wheezy/updates main


Like said in the comments to your question, be careful when running a machine using the Debian archive as those packages are not updated and so not secure anymore (even when using debian-security from the archive). It probably is OK if your machine is not directly connected to a network, but otherwise, I would highly recommend upgrading as soon as possible.

Solution 2:

Add the security updates:

deb http://archive.debian.org/debian wheezy main
deb http://archive.debian.org/debian-security wheezy/updates main

Solution 3:

If like me you are dealing with an embedded wheezy system and just need to make something work, here are the complete steps that worked for me.

The original sources no longer exist which causes the 404 error (not found), so we need to modify the source list. Remove the original line add the two archive lines.

vi /etc/apt/sources.list
    deb http://archive.debian.org/debian wheezy main
    deb http://archive.debian.org/debian-security wheezy/updates main

Change the date back to before the security certificate expired.

 date +%Y%m%d -s "20180101"

Update list.

apt-get update -o Acquire::Check-Valid-Until=false;

Install stuff.

apt-get install nano inotify-tools msmtp   -o Acquire::Check-Valid-Until=false;

No guarantee how long this will work for, but it worked for me in May 2020. Use at your own risk.