Failed to fetch http://ftp.debian.org/debian/dists/jessie-updates/main/ 404 Not Found

Executing apt update in a Debian 8 I get the error

W: Failed to fetch http://ftp.debian.org/debian/dists/wheezy-backports/main/binary-amd64/Packages 404 Not Found [IP: 2001:67c:2564:a119::148:12 80]
W: Failed to fetch http://ftp.debian.org/debian/dists/jessie-updates/main/source/Sources 404 Not Found [IP: 2001:41d0:202:100:213:32:5:7 80]
W: Failed to fetch http://ftp.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages 404 Not Found [IP: 2001:41d0:202:100:213:32:5:7 80]
W: Failed to fetch http://ftp.debian.org/debian/dists/jessie-backports/main/source/Sources 404 Not Found [IP: 2001:41d0:202:100:213:32:5:7 80]
W: Failed to fetch http://ftp.debian.org/debian/dists/jessie-backports/main/binary-amd64/Packages 404 Not Found [IP: 2001:41d0:202:100:213:32:5:7 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

This occurs because of Debian removes Wheezy and Jessie (except LTS) from mirrors.

The original sources.list file contains:

deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main

# jessie-updates, previously known as 'volatile'
deb http://ftp.debian.org/debian/ jessie-updates main
deb-src http://ftp.debian.org/debian/ jessie-updates main

# jessie-backports, previously on backports.debian.org
deb http://ftp.debian.org/debian/ jessie-backports main
deb-src http://ftp.debian.org/debian/ jessie-backports main

deb http://ftp.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.debian.orgf/debian/ jessie main contrib non-free

To resolve this problem you can do this steps:

Make a backup of t he sources.list file:

$ sudo cp -p /etc/apt/sources.list{,.back}

Change the references from “ftp.debian.org” to “archive.debian.org” in the sources.list file.

The new sources.list file contains:

deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main

deb http://archive.debian.org/debian/ jessie-backports main
deb-src http://archive.debian.org/debian/ jessie-backports main

deb http://archive.debian.org/debian/ jessie main contrib non-free
deb-src http://archive.debian.org/debian/ jessie main contrib non-free

If I execute the update:

$ sudo apt update

I get the next error because the backports has expired.

Release file for http://archive.debian.org/debian/dists/jessie-backports/InRelease is expired (invalid since 35d 13h 44min 19s). Updates for this repository will not be applied

To avoid this problem you can execute the command with the parameter “-o Acquire::Check-Valid-Until=false”

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

Or you can

$ echo "Acquire::Check-Valid-Until false;" | sudo tee -a /etc/apt/apt.conf.d/10-nocheckvalid

Now the “apt update” works fine.

6 comments

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.