Question

DigitalOcean Ubuntu Mirrors Failing for "apt update"

Posted March 31, 2020 6.9k views
Ubuntu 18.04

When using apt update the following error occurs. How to correct?

Hit:1 https://repos.insights.digitalocean.com/apt/do-agent main InRelease
Ign:2 http://mirrors.digitalocean.com/ubuntu cosmic InRelease
Ign:3 http://mirrors.digitalocean.com/ubuntu cosmic-updates InRelease
Hit:4 http://ppa.launchpad.net/certbot/certbot/ubuntu cosmic InRelease
Ign:5 http://security.ubuntu.com/ubuntu cosmic-security InRelease
Ign:6 http://archive.ubuntu.com/ubuntu cosmic InRelease
Ign:7 http://mirrors.digitalocean.com/ubuntu cosmic-backports InRelease
Err:8 http://security.ubuntu.com/ubuntu cosmic-security Release
  404  Not Found [IP: 91.189.88.142 80]
Err:9 http://mirrors.digitalocean.com/ubuntu cosmic Release
  404  Not Found [IP: 104.24.116.209 80]
Err:10 http://archive.ubuntu.com/ubuntu cosmic Release
  404  Not Found [IP: 91.189.88.142 80]
Err:11 http://mirrors.digitalocean.com/ubuntu cosmic-updates Release
  404  Not Found [IP: 104.24.116.209 80]
Err:12 http://mirrors.digitalocean.com/ubuntu cosmic-backports Release
  404  Not Found [IP: 104.24.116.209 80]
Reading package lists... Done
E: The repository 'http://security.ubuntu.com/ubuntu cosmic-security Release' no longer has 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://mirrors.digitalocean.com/ubuntu cosmic Release' no longer has 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' no longer has 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://mirrors.digitalocean.com/ubuntu cosmic-updates Release' no longer has 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://mirrors.digitalocean.com/ubuntu cosmic-backports Release' no longer has 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.
root@asset-us:/srv/asset-us.com# sudo apt-get update
Ign:1 http://security.ubuntu.com/ubuntu cosmic-security InRelease
Err:2 http://security.ubuntu.com/ubuntu cosmic-security Release
  404  Not Found [IP: 91.189.91.38 80]
Ign:3 http://mirrors.digitalocean.com/ubuntu cosmic InRelease
Hit:4 https://repos.insights.digitalocean.com/apt/do-agent main InRelease
Ign:5 http://mirrors.digitalocean.com/ubuntu cosmic-updates InRelease
Ign:6 http://mirrors.digitalocean.com/ubuntu cosmic-backports InRelease
Err:7 http://mirrors.digitalocean.com/ubuntu cosmic Release
  404  Not Found [IP: 104.24.117.209 80]
Err:8 http://mirrors.digitalocean.com/ubuntu cosmic-updates Release
  404  Not Found [IP: 104.24.117.209 80]
Err:9 http://mirrors.digitalocean.com/ubuntu cosmic-backports Release
  404  Not Found [IP: 104.24.117.209 80]
Ign:10 http://archive.ubuntu.com/ubuntu cosmic InRelease
Hit:11 http://ppa.launchpad.net/certbot/certbot/ubuntu cosmic InRelease
Err:12 http://archive.ubuntu.com/ubuntu cosmic Release
  404  Not Found [IP: 91.189.88.152 80]
Reading package lists... Done
E: The repository 'http://security.ubuntu.com/ubuntu cosmic-security Release' no longer has 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://mirrors.digitalocean.com/ubuntu cosmic Release' no longer has 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://mirrors.digitalocean.com/ubuntu cosmic-updates Release' no longer has 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://mirrors.digitalocean.com/ubuntu cosmic-backports Release' no longer has 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' no longer has 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.
root@asset-us:/srv/asset-us.com# sudo apt-get clean
root@asset-us:/srv/asset-us.com# sudo apt-get update
Hit:1 https://repos.insights.digitalocean.com/apt/do-agent main InRelease
Ign:2 http://mirrors.digitalocean.com/ubuntu cosmic InRelease
Ign:3 http://mirrors.digitalocean.com/ubuntu cosmic-updates InRelease
Ign:4 http://mirrors.digitalocean.com/ubuntu cosmic-backports InRelease
Hit:5 http://ppa.launchpad.net/certbot/certbot/ubuntu cosmic InRelease
Ign:6 http://security.ubuntu.com/ubuntu cosmic-security InRelease
Err:7 http://mirrors.digitalocean.com/ubuntu cosmic Release
  404  Not Found [IP: 104.24.117.209 80]
Ign:8 http://archive.ubuntu.com/ubuntu cosmic InRelease
Err:9 http://security.ubuntu.com/ubuntu cosmic-security Release
  404  Not Found [IP: 91.189.88.142 80]
Err:10 http://mirrors.digitalocean.com/ubuntu cosmic-updates Release
  404  Not Found [IP: 104.24.117.209 80]
Err:11 http://mirrors.digitalocean.com/ubuntu cosmic-backports Release
  404  Not Found [IP: 104.24.117.209 80]
Err:12 http://archive.ubuntu.com/ubuntu cosmic Release
  404  Not Found [IP: 91.189.88.142 80]
Reading package lists... Done
E: The repository 'http://mirrors.digitalocean.com/ubuntu cosmic Release' no longer has 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://security.ubuntu.com/ubuntu cosmic-security Release' no longer has 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://mirrors.digitalocean.com/ubuntu cosmic-updates Release' no longer has 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://mirrors.digitalocean.com/ubuntu cosmic-backports Release' no longer has 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' no longer has 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.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hey @btdavis

Ubuntu 18.10 (aka cosmic) reached end of life on July 18, 2019.

After a release has been EOL for some time, Ubuntu moves the repositories to denote that they are no longer supported. We just sync their archive changes in our mirrors. So when they disappear there, they disappear in ours as well.

Recommended fix:
Upgrade to Ubuntu 18.04

Alternate fix:

If you want to continue using an outdated release then edit /etc/apt/sources.list and change archive.ubuntu.com and security.ubuntu.com to old-releases.ubuntu.com.

then update with:

  • sudo apt-get update && sudo apt-get dist-upgrade
by Brian Boucheron
<$>[warning] Warning: As with almost any upgrade between major releases of an operating system, this process carries an inherent risk of failure, data loss, or broken software configuration. Comprehensive backups and extensive testing are strongly advised. To avoid...
Submit an Answer