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

Bart Robeyns
  • 471
  • 3
  • 4
  • 4
    In addition: if you have http://security.ubuntu.com/ubuntu occurrences, disable them as they also don't work. +1 for the answer. – zviad Apr 19 '20 at 11:11
  • 2
    Also works for replacing us.archive.ubuntu.com with that, thanks! I almost can't believe ubuntu makes this required, that is a huge confusion for lay users... – rogerdpack Apr 24 '20 at 03:16
  • I understand now that they moved archive to old-releases, but Canonical should not makes those changes. The software-properties-gtk application just can handle this change and you require users to do that manually. For a user perspective you just have a system that brokens by itself with no fair reason. – Alexandre Muller May 08 '20 at 15:54
  • This works for me. Thanks – Sohel Pathan Jun 19 '20 at 05:56
  • This answer worked for me. The chosen answer looks dangerous. – FractalSpace Nov 05 '20 at 18:23
  • and do you want Ubuntu to be for common lay users? How the fuck I'm gonna say my dad to do that? – João Pimentel Ferreira Feb 22 '21 at 22:19
  • The LTS (Long Term Support) versions are explicitly meant for longer term support, and therefor better suited for said lay users. It does state so explicitly on the download page (https://ubuntu.com/download/desktop), but admittedly there are other ways to obtain the installation image. Still, I've always seen both LTS and non-LTS offered, which for me personally raises enough curiosity to understand the difference. – Bart Robeyns Feb 22 '21 at 22:34
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.

  • Hello Jeremy, Thank you for your answer, I have to execute the 'apt -upgrade -y' command. I got this as a message with the status code 1 An upgrade from 'cosmic' to 'eoan' is not supported with this tool. === Command detached from window (Mon Feb 24 08:11:24 2020) === === Command terminated with exit status 1 (Mon Feb 24 08:11:34 2020) === Checking the package manager Unable to upgrade – Sejdra Feb 24 '20 at 08:23
  • Reading cache Checking package manager Can not upgrade An upgrade from 'cosmic' to 'eoan' is not supported with this tool. === Command detached from window (Mon Feb 24 11:50:13 2020) === === Command terminated with exit status 1 (Mon Feb 24 11:50:23 2020) === – Sejdra Feb 24 '20 at 10:52
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.

John
  • 46,167
  • 4
  • 33
  • 54
  • I can't upgrade or downgrade my version of ubuntu... – Sejdra Feb 24 '20 at 08:26
  • Reading cache Checking package manager Can not upgrade An upgrade from 'cosmic' to 'eoan' is not supported with this tool. === Command detached from window (Mon Feb 24 11:50:13 2020) === === Command terminated with exit status 1 (Mon Feb 24 11:50:23 2020) === – Sejdra Feb 24 '20 at 10:52
  • (a) Why can you not use Version 18.04 LTS? (b) What about upgrading to a newer version? – John Feb 24 '20 at 11:41