apt-get reports Packages not found

So.. this shit again.

# apt-get update
Ign http://ftp.debian.org jessie-updates InRelease
Ign http://ftp.debian.org jessie-updates Release.gpg
Ign http://ftp.debian.org jessie-updates Release
Ign http://ftp.debian.org jessie-updates/main Sources/DiffIndex
Ign http://ftp.debian.org jessie-updates/main i386 Packages/DiffIndex
Ign http://ftp.no.debian.org jessie InRelease
Ign http://ftp.no.debian.org jessie Release.gpg
Ign http://ftp.no.debian.org jessie Release
Ign http://ftp.no.debian.org jessie/main Sources/DiffIndex
Ign http://ftp.no.debian.org jessie/main i386 Packages/DiffIndex
Ign http://security.debian.org jessie/updates InRelease
Ign http://security.debian.org jessie/updates Release.gpg
Ign http://security.debian.org jessie/updates Release
Ign http://security.debian.org jessie/updates/main Sources/DiffIndex
Ign http://security.debian.org jessie/updates/main i386 Packages/DiffIndex
Err http://security.debian.org jessie/updates/main Sources 404 Not Found [IP: 212.211.132.250 80]
Err http://security.debian.org jessie/updates/main i386 Packages 404 Not Found [IP: 212.211.132.250 80]
Err http://ftp.debian.org jessie-updates/main Sources 404 Not Found [IP: 130.89.148.12 80]
Err http://ftp.debian.org jessie-updates/main i386 Packages 404 Not Found [IP: 130.89.148.12 80]
Err http://ftp.no.debian.org jessie/main Sources 404 Not Found [IP: 130.239.18.173 80]
Err http://ftp.no.debian.org jessie/main i386 Packages 404 Not Found [IP: 130.239.18.173 80]
W: Failed to fetch http://ftp.debian.org/debian/dists/jessie-updates/main/source/Sources 404 Not Found [IP: 130.89.148.12 80]
W: Failed to fetch http://ftp.debian.org/debian/dists/jessie-updates/main/binary-i386/Packages 404 Not Found [IP: 130.89.148.12 80]
W: Failed to fetch http://ftp.no.debian.org/debian/dists/jessie/main/source/Sources 404 Not Found [IP: 130.239.18.173 80]
W: Failed to fetch http://ftp.no.debian.org/debian/dists/jessie/main/binary-i386/Packages 404 Not Found [IP: 130.239.18.173 80]
W: Failed to fetch http://security.debian.org/dists/jessie/updates/main/source/Sources 404 Not Found [IP: 212.211.132.250 80]
W: Failed to fetch http://security.debian.org/dists/jessie/updates/main/binary-i386/Packages 404 Not Found [IP: 212.211.132.250 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

If you really want to see what happens here, you can go after it with Wireshark and look at the raw http calls. I won’t go into detail, but the problem is the partially downloaded package lists, which on Debian reside in /var/lib/apt/lists/partial/

# ll /var/lib/apt/lists/partial/*
-rw-r--r-- 1 root root 140K Aug 16 2016 /var/lib/apt/lists/partial/ftp.debian.org_debian_dists_jessie-updates_InRelease.reverify
-rw-r--r-- 1 root root 2.4K Jun 4 2016 /var/lib/apt/lists/partial/ftp.no.debian.org_debian_dists_jessie_Release.gpg.reverify
-rw-r--r-- 1 root root 62K Aug 15 2016 /var/lib/apt/lists/partial/security.debian.org_dists_jessie_updates_InRelease.reverify

(your file listing may, and probably will, differ)

Anyway, remove them by issuing rm /var/lib/apt/lists/partial/* and update again.

Note that this is but one of the errors that can cause this kind of a mess. Another one I’ve experienced is a somewhat overzealous firewall. If the above does not resolve a problem, check if you’re in any way filtering outbound traffic.

Leave a Reply

Your email address will not be published.