lasseitdk
By:
lasseitdk

Problems with apt-get update

April 21, 2015 3k views
System Tools Debian Ubuntu

I have a problem with apt-get update when i run the command it takes 5 minutes and outputs a error

All output:

Ign http://ppa.launchpad.net utopic InRelease
Ign http://ppa.launchpad.net utopic InRelease
Hit http://ppa.launchpad.net utopic Release.gpg
Hit http://ppa.launchpad.net utopic Release.gpg
Hit http://ppa.launchpad.net utopic Release
Hit http://ppa.launchpad.net utopic Release
Hit http://ppa.launchpad.net utopic/main amd64 Packages
Hit http://ppa.launchpad.net utopic/main i386 Packages
Ign http://packages.elasticsearch.org stable InRelease
Hit http://ppa.launchpad.net utopic/main Translation-en
Hit http://ppa.launchpad.net utopic/main amd64 Packages
Hit http://ppa.launchpad.net utopic/main i386 Packages
Hit http://ppa.launchpad.net utopic/main Translation-en
Ign http://packages.elasticsearch.org stable InRelease
Hit http://packages.elasticsearch.org stable Release.gpg
Hit http://packages.elasticsearch.org stable Release.gpg
Hit http://packages.elasticsearch.org stable Release
Hit http://packages.elasticsearch.org stable Release
Ign http://mirrors.digitalocean.com utopic InRelease
Ign http://mirrors.digitalocean.com utopic-updates InRelease
Ign http://security.ubuntu.com utopic-security InRelease
Hit http://security.ubuntu.com utopic-security Release.gpg
Ign http://mirrors.digitalocean.com utopic-backports InRelease
Hit http://security.ubuntu.com utopic-security Release
Hit http://mirrors.digitalocean.com utopic Release.gpg
Get:1 http://mirrors.digitalocean.com utopic-updates Release.gpg [933 B]
Hit http://mirrors.digitalocean.com utopic-backports Release.gpg
Hit http://mirrors.digitalocean.com utopic Release
Get:2 http://mirrors.digitalocean.com utopic-updates Release [63.5 kB]
Hit http://mirrors.digitalocean.com utopic-backports Release
Hit http://security.ubuntu.com utopic-security/main Sources
Hit http://security.ubuntu.com utopic-security/restricted Sources
Hit http://security.ubuntu.com utopic-security/universe Sources
Hit http://security.ubuntu.com utopic-security/multiverse Sources
Hit http://security.ubuntu.com utopic-security/main amd64 Packages
Hit http://mirrors.digitalocean.com utopic/multiverse Sources
Hit http://security.ubuntu.com utopic-security/restricted amd64 Packages
Hit http://security.ubuntu.com utopic-security/universe amd64 Packages
Hit http://security.ubuntu.com utopic-security/multiverse amd64 Packages
Hit http://security.ubuntu.com utopic-security/main i386 Packages
Hit http://security.ubuntu.com utopic-security/restricted i386 Packages
Hit http://security.ubuntu.com utopic-security/universe i386 Packages
Hit http://security.ubuntu.com utopic-security/multiverse i386 Packages
Hit http://security.ubuntu.com utopic-security/main Translation-en
Hit http://security.ubuntu.com utopic-security/multiverse Translation-en
Hit http://security.ubuntu.com utopic-security/restricted Translation-en
Hit http://security.ubuntu.com utopic-security/universe Translation-en
Get:3 http://packages.elasticsearch.org stable/main amd64 Packages [1,618 B]
Hit http://packages.elasticsearch.org stable/main amd64 Packages
Hit http://packages.elasticsearch.org stable/main i386 Packages
Hit http://packages.elasticsearch.org stable/main i386 Packages
Ign http://packages.elasticsearch.org stable/main Translation-enUS
Ign http://packages.elasticsearch.org stable/main Translation-en
Ign http://packages.elasticsearch.org stable/main Translation-en
US
Ign http://packages.elasticsearch.org stable/main Translation-en
Hit http://mirrors.digitalocean.com utopic-backports/restricted Sources
Hit http://mirrors.digitalocean.com utopic-backports/universe Sources
Hit http://mirrors.digitalocean.com utopic-backports/multiverse Sources
Hit http://mirrors.digitalocean.com utopic-backports/restricted Translation-en
Hit http://mirrors.digitalocean.com utopic/restricted Sources
Get:4 http://mirrors.digitalocean.com utopic-updates/restricted Sources [1,906 B]
Get:5 http://mirrors.digitalocean.com utopic-updates/universe Sources [27.6 kB]
Get:6 http://mirrors.digitalocean.com utopic-updates/multiverse Sources [1,765 B]
Get:7 http://mirrors.digitalocean.com utopic-updates/main amd64 Packages [323 kB]
Get:8 http://mirrors.digitalocean.com utopic-updates/restricted amd64 Packages [14.1 kB]
Get:9 http://mirrors.digitalocean.com utopic-updates/universe amd64 Packages [121 kB]
Get:10 http://mirrors.digitalocean.com utopic-updates/multiverse amd64 Packages [3,943 B]
Get:11 http://mirrors.digitalocean.com utopic-updates/main i386 Packages [321 kB]
Get:12 http://mirrors.digitalocean.com utopic-updates/restricted i386 Packages [14.1 kB]
Get:13 http://mirrors.digitalocean.com utopic-updates/universe i386 Packages [121 kB]
Get:14 http://mirrors.digitalocean.com utopic-updates/multiverse i386 Packages [4,102 B]
Hit http://mirrors.digitalocean.com utopic-backports/restricted amd64 Packages
Hit http://mirrors.digitalocean.com utopic-backports/universe amd64 Packages
Hit http://mirrors.digitalocean.com utopic-backports/multiverse amd64 Packages
Hit http://mirrors.digitalocean.com utopic-backports/main i386 Packages
Hit http://mirrors.digitalocean.com utopic-backports/restricted i386 Packages
Hit http://mirrors.digitalocean.com utopic-backports/universe i386 Packages
Hit http://mirrors.digitalocean.com utopic-backports/multiverse i386 Packages
Hit http://mirrors.digitalocean.com utopic-backports/main Translation-en
Hit http://mirrors.digitalocean.com utopic-backports/multiverse Translation-en
Hit http://mirrors.digitalocean.com utopic-backports/universe Translation-en
Hit http://mirrors.digitalocean.com utopic/main amd64 Packages
Hit http://mirrors.digitalocean.com utopic/restricted amd64 Packages
Err http://mirrors.digitalocean.com utopic/universe amd64 Packages
404 Not Found [IP: 198.199.99.226 80]
Err http://mirrors.digitalocean.com utopic/restricted i386 Packages
404 Not Found [IP: 198.199.99.226 80]
Err http://mirrors.digitalocean.com utopic/universe i386 Packages
404 Not Found [IP: 198.199.99.226 80]
Err http://mirrors.digitalocean.com utopic/multiverse i386 Packages
404 Not Found [IP: 198.199.99.226 80]
Hit http://mirrors.digitalocean.com utopic/main Translation-en
Hit http://mirrors.digitalocean.com utopic/multiverse Translation-en
Hit http://mirrors.digitalocean.com utopic/restricted Translation-en
Hit http://mirrors.digitalocean.com utopic/universe Translation-en
Err http://mirrors.digitalocean.com utopic-updates/main Sources
404 Not Found [IP: 198.199.99.226 80]
Hit http://mirrors.digitalocean.com utopic-updates/main Translation-en
Hit http://mirrors.digitalocean.com utopic-updates/multiverse Translation-en
Hit http://mirrors.digitalocean.com utopic-updates/restricted Translation-en
Hit http://mirrors.digitalocean.com utopic-updates/universe Translation-en
Err http://mirrors.digitalocean.com utopic-backports/main Sources
404 Not Found [IP: 198.199.99.226 80]
Hit http://mirrors.digitalocean.com utopic-backports/main amd64 Packages
Hit http://mirrors.digitalocean.com utopic/main Sources
Err http://mirrors.digitalocean.com utopic/universe Sources
404 Not Found [IP: 198.199.99.226 80]
Hit http://mirrors.digitalocean.com utopic/multiverse amd64 Packages
Err http://mirrors.digitalocean.com utopic/main i386 Packages
404 Not Found [IP: 198.199.99.226 80]
Fetched 1,018 kB in 4min 23s (3,863 B/s)
W: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/utopic/universe/source/Sources 404 Not Found [IP: 198.199.99.226 80]
W: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/utopic/universe/binary-amd64/Packages 404 Not Found [IP: 198.199.99.226 80]
W: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/utopic/main/binary-i386/Packages 404 Not Found [IP: 198.199.99.226 80]
W: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/utopic/restricted/binary-i386/Packages 404 Not Found [IP: 198.199.99.226 80]
W: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/utopic/universe/binary-i386/Packages 404 Not Found [IP: 198.199.99.226 80]
W: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/utopic/multiverse/binary-i386/Packages 404 Not Found [IP: 198.199.99.226 80]
W: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/utopic-updates/main/source/Sources 404 Not Found [IP: 198.199.99.226 80]
W: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/utopic-backports/main/source/Sources 404 Not Found [IP: 198.199.99.226 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

4 comments
  • Confirming same issue at this time.
    Remembering that the server asked for a reboot following an update couple of days ago,
    I did reboot and reissued the apt-get update. Message count improved but the following remained.
    W: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/utopic/universe/source/Sources 404 Not Found [IP: 192.241.164.26 80]

  • Same issue here. And cannot solve it =/

  • Same issue.
    I try this but failed.
    rm -rf /etc/apt/sources/*

  • mirrors.digitalocean.com has an update task on DigitalOcean that happens at specific times so this or similar errors will arise everytime DigitalOcean is updating their mirrors. I asked them to provide information on when this actually happens. From https://status.digitalocean.com/ page it is unclear. Also would be great to have API to get timing when their maintenance tasks do happen.

1 Answer

This is how I fixed it.

*Warning: * You should perform a snapshot or a backup of your droplet before attempting to upgrade Ubuntu or modify the /etc/apt/sources.list

Ubuntu Utopic Unicorn reached end of life on July 25th 2015, so the apt-get server URL have changed from archive.ubuntu.com to old-releases.ubuntu.com. I'm not sure what is the problem with DO mirrors, I just end up replacing the whole content of /etc/apt/sources.list file with:

# /etc/apt/sources.list
deb http://old-releases.ubuntu.com/ubuntu/ utopic main restricted
deb http://old-releases.ubuntu.com/ubuntu utopic-security main restricted
deb http://old-releases.ubuntu.com/ubuntu/ utopic-updates main restricted

# Dépôts de sources (uniquement utiles pour télécharger les sources avec apt-get source. Dans ce cas, enlever les #)
# deb-src http://old-releases.ubuntu.com/ubuntu/ utopic main restricted
# deb-src http://old-releases.ubuntu.com/ubuntu/ utopic-updates main restricted
# deb-src http://old-releases.ubuntu.com/ubuntu utopic-security main restricted

deb http://old-releases.ubuntu.com/ubuntu/ utopic universe multiverse
deb http://old-releases.ubuntu.com/ubuntu utopic-security universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ utopic-updates universe multiverse

# Dépôts de sources (uniquement utiles pour télécharger les sources avec apt-get source. Dans ce cas, enlever les #)
# deb-src http://old-releases.ubuntu.com/ubuntu/ utopic universe multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu/ utopic-updates universe multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu utopic-security universe multiverse

deb http://old-releases.ubuntu.com/ubuntu/ utopic-backports main restricted universe multiverse

# Dépôts de sources (uniquement utiles pour télécharger les sources avec apt-get source. Dans ce cas, enlever les #)
# deb-src http://old-releases.ubuntu.com/ubuntu/ utopic-backports main restricted universe multiverse

deb http://old-releases.ubuntu.com/ubuntu/ utopic-proposed main restricted universe multiverse

# Dépôts de sources (uniquement utiles pour télécharger les sources avec apt-get source. Dans ce cas, enlever les #)
# deb-src http://old-releases.ubuntu.com/ubuntu/ utopic-proposed main restricted universe multiverse

## Commercial
deb http://archive.canonical.com/ubuntu utopic partner

## Sources
# deb-src http://archive.canonical.com/ubuntu utopic partner

To avoid that kind of problem in the future and continue to get security updates, I did an upgrade to a supported version of Ubuntu (ie: non end-of-life version) as explained here: http://askubuntu.com/questions/91815/how-to-install-software-or-upgrade-from-an-old-unsupported-release

Which could be resumed to:

sudo apt-get update
sudo apt-get dist-upgrade

# will open an additional SSH port (1022) in case of problem, you may have to disable firewall rules
iptables -I INPUT -p tcp --dport 1022 -j ACCEPT

sudo do-release-upgrade

Then follow the instructions. Be patient, the upgrade process will take a while to complete.

If everything go well, you will have Ubuntu Vivid Vervet (15.04) installed. Run do-release-upgrade again to update your droplet to the latest supported version of Ubuntu (15.10 aka "Wily Werewolf").

The next Ubuntu Long Term Support (LTS) release should be out next month, so, I plan another upgrade soon.

Hope it helps!

Have another answer? Share your knowledge.