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.

4 Answers 4

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

7
  • 4
    In addition: if you have security.ubuntu.com/ubuntu occurrences, disable them as they also don't work. +1 for the answer.
    – zviad
    Apr 19, 2020 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, 2020 at 3: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. May 8, 2020 at 15:54
  • This works for me. Thanks Jun 19, 2020 at 5:56
  • This answer worked for me. The chosen answer looks dangerous. Nov 5, 2020 at 18:23
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

1
  • This is a bad idea. See Bart Robeyns answer for the correct solution. Mar 24, 2020 at 18:53
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.

2
  • 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, 2020 at 8: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, 2020 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.

3
  • I can't upgrade or downgrade my version of ubuntu...
    – Sejdra
    Feb 24, 2020 at 8: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, 2020 at 10:52
  • (a) Why can you not use Version 18.04 LTS? (b) What about upgrading to a newer version?
    – John
    Feb 24, 2020 at 11:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .