12

According to the answer here, the debian stretch repositories have been changed to archive.

apt-get update failed to fetch debian amd64 packages while building dockerfile from maven:3.5.2-jdk-8

My previous /etc/apt/sources.list was this:

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

deb http://deb.debian.org/debian stretch main deb-src http://deb.debian.org/debian stretch main

deb http://deb.debian.org/debian stretch-updates main deb-src http://deb.debian.org/debian stretch-updates main"

I changed deb.debian.org to archive.debian.org in the sources.list file but I am getting the follow errors when I do apt update:

Ign:1 http://security.debian.org/debian-security stretch/updates InRelease
Err:2 http://security.debian.org/debian-security stretch/updates Release
  404 Not Found [IP: 146.75.106.132 80]
Ign:3 http://archive.debian.org/debian stretch InRelease
Ign:4 http://archive.debian.org/debian stretch-updates InRelease
Hit:5 http://archive.debian.org/debian stretch Release
Err:6 http://archive.debian.org/debian stretch-updates Release
  404 Not Found [IP: 209.87.16.41 80]
Reading package lists...Done
E: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://archive.debian.org/debian stretch-updates Release' does not have a Release file. 
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
rocky_alpine
  • 327
  • 1
  • 3
  • 9

1 Answers1

22

The security repository has been moved too; use

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

stretch-updates is gone, you should remove that line; it was used for updates in between point-releases, and has no use for an archived release (and thus isn’t archived itself).

Note that the reason Stretch was moved to the archive repository is that it’s been out of support (through Debian only) since the end of June 2022; while the security repository still exists, it won’t receive further updates. If you want security updates after June 2022, you should consider moving to a newer release, or enabling the extended LTS repositories, which will provide updates for a subset of Debian 9 packages until the end of June 2027 (you can influence the subset of packages which gets updated by subscribing).

Stephen Kitt
  • 434,908
  • How to add it without editor or deb -> Just echo 'your source' > /etc/apt/sources.list More https://unix.stackexchange.com/questions/371890/debian-the-repository-does-not-have-a-release-file – fearis Jan 12 '24 at 14:43
  • So annoying when these URLs change - how does one find these new URLs? seems like these are not being officially announce anywhere... have to google it and find it in random posts... – TheStoryCoder Feb 29 '24 at 13:26
  • @TheStoryCoder the moves are announced on debian-devel-announce, see for example the Jessie announcement — I agree this isn’t particularly discoverable. Archived distributions are listed here, which is accessible from the Getting Debian from the Internet page, but the latter is no longer linked anywhere. – Stephen Kitt Feb 29 '24 at 14:58