28

Problem: error 404 code status http://archive.ubuntu.com/ubuntu cosmic InRelease

Ubuntu 18.10 cosmic end of life

since yesterday, apt install commands no longer work, I tried to upgrade my system version but i got the same error of apt-get update command

$ apt update
Ign:1 http://archive.ubuntu.com/ubuntu cosmic InRelease
Ign:2 http://security.ubuntu.com/ubuntu cosmic-security InRelease
Ign:3 http://archive.ubuntu.com/ubuntu cosmic-updates InRelease
Ign:4 http://archive.ubuntu.com/ubuntu cosmic-backports InRelease
Err:5 http://security.ubuntu.com/ubuntu cosmic-security Release
  404  Not Found [IP: 91.189.88.173 80]
Err:6 http://archive.ubuntu.com/ubuntu cosmic Release
  404  Not Found [IP: 91.189.88.31 80]
Err:7 http://archive.ubuntu.com/ubuntu cosmic-updates Release
  404  Not Found [IP: 91.189.88.31 80]
Err:8 http://archive.ubuntu.com/ubuntu cosmic-backports Release
  404  Not Found [IP: 91.189.88.31 80]
Reading package lists... Done
E: The repository 'http://security.ubuntu.com/ubuntu cosmic-security 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.ubuntu.com/ubuntu cosmic 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.ubuntu.com/ubuntu cosmic-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.ubuntu.com/ubuntu cosmic-backports 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.
Sejdra
  • 461
  • 1
  • 4
  • 7

4 Answers4

37

The repositories are still available on http://old-releases.ubuntu.com/ubuntu. You can change them in /etc/apt/sources.list, replacing all occurences of http://archive.ubuntu.com with http://old-releases.ubuntu.com.

After that, apt-get upgrade will work again.

More info on dealing with no longer supported versions at https://help.ubuntu.com/community/EOLUpgrades

8

Finally I forced the downgrade to change the source.list ... I followed this article : https://linuxconfig.org/how-to-downgrade-ubuntu-linux-system-to-its-previous-version

Sejdra
  • 461
  • 1
  • 4
  • 7
2
  1. It's because your Ubuntu version is out of date. That means Ubuntu does not provide security support because the system is too old. You need to disable the bad repos in your sources list and then run apt again.

  2. apt-update does not upgrade your system. It only updates the repositories in your system. If you need to upgrade to another Ubuntu version, run do-release-upgrade. Otherwise, run apt-upgrade -y to upgrade system packages. Obviously, run sudo if you are not the root user.

1

You can use Ubuntu 18.04 as that is close to what you have, is a Long Term Service version, and updates just fine. I update my Ubuntu machine regularly.