Question

unable to update. Getting the error while running the command -sudo apt update

Getting the error as below, while running- sudo apt update command. Ubuntu server version is -21.04:

Ign:1 http://mirrors.digitalocean.com/ubuntu hirsute InRelease
Ign:2 http://mirrors.digitalocean.com/ubuntu hirsute-updates InRelease
Ign:3 http://mirrors.digitalocean.com/ubuntu hirsute-backports InRelease
Hit:4 http://old-releases.ubuntu.com/ubuntu hirsute-security InRelease
Err:5 http://mirrors.digitalocean.com/ubuntu hirsute Release
  404  Not Found [IP: 172.64.80.1 80]
Err:6 http://mirrors.digitalocean.com/ubuntu hirsute-updates Release
  404  Not Found [IP: 172.64.80.1 80]
Err:7 http://mirrors.digitalocean.com/ubuntu hirsute-backports Release
  404  Not Found [IP: 172.64.80.1 80]
Reading package lists... Done
E: The repository 'http://mirrors.digitalocean.com/ubuntu hirsute 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 hirsute-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 hirsute-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.

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Accepted Answer

Hi there,

The error messages you’re seeing indicate that the repositories for Ubuntu 21.04 (Hirsute Hippo) are no longer available at the specified URLs. This is expected behavior when a version of Ubuntu reaches its end of life (EOL).

After a release reaches its EOL, its repositories are moved to old-releases.ubuntu.com, and the main mirrors (like the DigitalOcean mirror you’re using) will no longer host them.

It is best to plan an upgrade to a supported version like 22.04 for example. Here is a step by step tutorial on how to do that:

https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-ubuntu-22-04-jammy-jellyfish

If you prefer to keep using 21.04, here is what you could try:

  1. Backup Important Data: Before making any changes, ensure you have backups of any important data.

  2. Update the Repository Sources:

    • Open the sources list:

      sudo nano /etc/apt/sources.list
      
    • Replace all instances of http://mirrors.digitalocean.com/ubuntu with http://old-releases.ubuntu.com/ubuntu.

    • Save and close the file (in nano, press CTRL + X, then press Y, then press Enter).

  3. Update and Upgrade:

    • Run the update command again:

      sudo apt update
      
    • Then, upgrade the packages:

      sudo apt upgrade
      

Hope that this helps!

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel