7

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
  • 117
  • 1
  • 1
  • 5

1 Answers1

16

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.

Note that the reason Stretch was moved to the archive repository is that it’s been out of support (through Debian only) for nearly a year. You should consider moving to a newer release, or enabling the extended LTS repositories (if you use supported packages, which you can influence by subscribing).

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164
  • So Debian stretch still gets security updates but from ELTS rather than LTS since it’s EOL ? What does stretch-updates refer to ? Non security updates ? – rocky_alpine Apr 29 '23 at 21:53
  • `stretch-updates` was used for bug fixes etc., not security updates (see [this post](https://unix.stackexchange.com/a/210405/86440) for details). Since Stretch won’t ever get such updates again, `stretch-updates` is useless and was removed entirely. A **subset** of Debian Stretch still gets security fixes through ELTS, yes. – Stephen Kitt Apr 30 '23 at 11:05
  • The usual unhelpful lectures about using a discontinued distribution doesn't answer the question and should never be part of an accepted answer. – fred Jun 27 '23 at 23:28
  • 1
    @‘red many users don’t realise that it’s unsupported; I don’t want to lull them into a false sense of security by telling them to enable a “security” repository which isn’t actually maintained. – Stephen Kitt Jun 28 '23 at 08:03