Question

DigitalOcean mirrors not available on apt update

I’m trying to update the packages on a fresh Ubuntu 24.10 droplet. Every time I run apt update I get an error informing me that the connection to the mirror cannot be established.

Warning: Some index files failed to download. They have been ignored, or old ones used instead. root@ubuntu-s-2vcpu-4gb-amd-fra1-01:~# ping https://repos-droplet.digitalocean.com/apt/droplet-agent/dists/main/InRelease ping: https://repos-droplet.digitalocean.com/apt/droplet-agent/dists/main/InRelease: Name or service not known root@ubuntu-s-2vcpu-4gb-amd-fra1-01:~# ping https://repos-droplet.digitalocean.com/apt/droplet-agent/dists/main/InRelease ping: https://repos-droplet.digitalocean.com/apt/droplet-agent/dists/main/InRelease: Name or service not known root@ubuntu-s-2vcpu-4gb-amd-fra1-01:~# apt update Ign:1 https://repos-droplet.digitalocean.com/apt/droplet-agent main InRelease Ign:2 http://mirrors.digitalocean.com/ubuntu oracular InRelease Ign:3 http://mirrors.digitalocean.com/ubuntu oracular-updates InRelease Ign:4 http://mirrors.digitalocean.com/ubuntu oracular-backports InRelease Ign:5 http://security.ubuntu.com/ubuntu oracular-security InRelease Ign:1 https://repos-droplet.digitalocean.com/apt/droplet-agent main InRelease Ign:2 http://mirrors.digitalocean.com/ubuntu oracular InRelease Ign:3 http://mirrors.digitalocean.com/ubuntu oracular-updates InRelease Ign:4 http://mirrors.digitalocean.com/ubuntu oracular-backports InRelease Ign:5 http://security.ubuntu.com/ubuntu oracular-security InRelease Ign:1 https://repos-droplet.digitalocean.com/apt/droplet-agent main InRelease Ign:2 http://mirrors.digitalocean.com/ubuntu oracular InRelease Ign:3 http://mirrors.digitalocean.com/ubuntu oracular-updates InRelease Ign:4 http://mirrors.digitalocean.com/ubuntu oracular-backports InRelease Ign:5 http://security.ubuntu.com/ubuntu oracular-security InRelease Err:1 https://repos-droplet.digitalocean.com/apt/droplet-agent main InRelease Cannot initiate the connection to repos-droplet.digitalocean.com:443 (2606:4700::6813:ae44). - connect (101: Network is unreachable) Cannot initiate the connection to repos-droplet.digitalocean.com:443 (2606:4700::6813:ad44). - connect (101: Network is unreachable) Could not connect to repos-droplet.digitalocean.com:443 (104.19.173.68), connection timed out Could not connect to repos-droplet.digitalocean.com:443 (104.19.174.68), connection timed out Err:2 http://mirrors.digitalocean.com/ubuntu oracular InRelease Cannot initiate the connection to mirrors.digitalocean.com:80 (2606:4700:3036::ac43:9447). - connect (101: Network is unreachable) Cannot initiate the connection to mirrors.digitalocean.com:80 (2606:4700:3034::6815:1d0d). - connect (101: Network is unreachable) Could not connect to mirrors.digitalocean.com:80 (172.67.148.71), connection timed out Could not connect to mirrors.digitalocean.com:80 (104.21.29.13), connection timed out Err:3 http://mirrors.digitalocean.com/ubuntu oracular-updates InRelease Cannot initiate the connection to mirrors.digitalocean.com:80 (2606:4700:3036::ac43:9447). - connect (101: Network is unreachable) Cannot initiate the connection to mirrors.digitalocean.com:80 (2606:4700:3034::6815:1d0d). - connect (101: Network is unreachable) Err:4 http://mirrors.digitalocean.com/ubuntu oracular-backports InRelease Cannot initiate the connection to mirrors.digitalocean.com:80 (2606:4700:3036::ac43:9447). - connect (101: Network is unreachable) Cannot initiate the connection to mirrors.digitalocean.com:80 (2606:4700:3034::6815:1d0d). - connect (101: Network is unreachable) Err:5 http://security.ubuntu.com/ubuntu oracular-security InRelease Cannot initiate the connection to security.ubuntu.com:80 (2620:2d:4002:1::103). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2620:2d:4000:1::102). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2620:2d:4000:1::101). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2620:2d:4000:1::103). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2620:2d:4002:1::101). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (185.125.190.82), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.83), connection timed out Could not connect to security.ubuntu.com:80 (185.125.190.83), connection timed out Could not connect to security.ubuntu.com:80 (185.125.190.81), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.81), connection timed out 2 packages can be upgraded. Run 'apt list --upgradable' to see them. Warning: Failed to fetch https://repos-droplet.digitalocean.com/apt/droplet-agent/dists/main/InRelease Cannot initiate the connection to repos-droplet.digitalocean.com:443 (2606:4700::6813:ae44). - connect (101: Network is unreachable) Cannot initiate the connection to repos-droplet.digitalocean.com:443 (2606:4700::6813:ad44). - connect (101: Network is unreachable) Could not connect to repos-droplet.digitalocean.com:443 (104.19.173.68), connection timed out Could not connect to repos-droplet.digitalocean.com:443 (104.19.174.68), connection timed out Warning: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/oracular/InRelease Cannot initiate the connection to mirrors.digitalocean.com:80 (2606:4700:3036::ac43:9447). - connect (101: Network is unreachable) Cannot initiate the connection to mirrors.digitalocean.com:80 (2606:4700:3034::6815:1d0d). - connect (101: Network is unreachable) Could not connect to mirrors.digitalocean.com:80 (172.67.148.71), connection timed out Could not connect to mirrors.digitalocean.com:80 (104.21.29.13), connection timed out Warning: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/oracular-updates/InRelease Cannot initiate the connection to mirrors.digitalocean.com:80 (2606:4700:3036::ac43:9447). - connect (101: Network is unreachable) Cannot initiate the connection to mirrors.digitalocean.com:80 (2606:4700:3034::6815:1d0d). - connect (101: Network is unreachable) Warning: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/oracular-backports/InRelease Cannot initiate the connection to mirrors.digitalocean.com:80 (2606:4700:3036::ac43:9447). - connect (101: Network is unreachable) Cannot initiate the connection to mirrors.digitalocean.com:80 (2606:4700:3034::6815:1d0d). - connect (101: Network is unreachable) Warning: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oracular-security/InRelease Cannot initiate the connection to security.ubuntu.com:80 (2620:2d:4002:1::103). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2620:2d:4000:1::102). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2620:2d:4000:1::101). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2620:2d:4000:1::103). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2620:2d:4002:1::101). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (185.125.190.82), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.83), connection timed out Could not connect to security.ubuntu.com:80 (185.125.190.83), connection timed out Could not connect to security.ubuntu.com:80 (185.125.190.81), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.81), connection timed out Warning: Some index files failed to download. They have been ignored, or old ones used instead.

I’ve read around and it seems that the source file could be outdated:

Types: deb
URIs: http://mirrors.digitalocean.com/ubuntu/
Suites: oracular oracular-updates oracular-backports
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

## Ubuntu security updates. Aside from URIs and Suites,
## this should mirror your choices in the previous section.
Types: deb
URIs: http://security.ubuntu.com/ubuntu
Suites: oracular-security
Components: main universe restricted multiverse
"/etc/apt/sources.list.d/ubuntu.sources" 55L, 3007B    

I’ve tried changing the digitalocean mirrors to “http://archive.ubuntu.com/ubuntu” but that is not working.

Any ideas what could be the issue?


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.

Bobby Iliev
Site Moderator
Site Moderator badge
November 4, 2024

Hey there! 👋

What I could suggest starting with is to confirm that your Droplet has internet access. You can test by pinging Google:

ping google.com

If this fails, the issue might be with your network configuration on the Droplet. Try restarting your network service:

sudo systemctl restart networking

If the issue persists, double-check your firewall settings, both on DigitalOcean (Cloud Firewalls) and on the Droplet (UFW) to ensure that outbound connections aren’t being blocked.

Let me know how it goes!

- Bobby

KFSys
Site Moderator
Site Moderator badge
November 7, 2024

Heya,

A few suggestions

Update the Mirror Sources:

  • Modify your /etc/apt/sources.list file to use Ubuntu’s primary archive instead of DigitalOcean’s mirrors. Open the file:
sudo nano /etc/apt/sources.list
    • Replace all instances of http://mirrors.digitalocean.com/ubuntu and http://security.ubuntu.com/ubuntu with http://archive.ubuntu.com/ubuntu and http://security.ubuntu.com/ubuntu. Check Network Configuration:
  • Ensure that the network is fully functional. Try basic connectivity tests:

ping google.com
    • If this fails, you might have a DNS or network configuration issue on your Droplet.
  • Update DNS Settings:

    • If DNS lookups are failing, try updating your DNS settings to use a reliable DNS provider like Google or Cloudflare. Add these entries to /etc/resolv.conf:
nameserver 8.8.8.8
nameserver 8.8.4.4
    • Afterward, retry apt update.
alexdo
Site Moderator
Site Moderator badge
November 8, 2024

Heya, @ngarcia333

On top of what’s already been mentioned, your error messages show IPv6 addresses, which suggests that apt is attempting to connect over IPv6. If your network setup doesn’t support IPv6, you can force apt to use IPv4:

echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4

You can check our docs on IPv6 here:

https://docs.digitalocean.com/products/networking/ipv6/how-to/enable/

However as mentioned you can first ensure that the droplet is able to access external sources and that the network is functioning as expected.

Regards

Become a contributor for community

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

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.