How to speed up apt-get on Digital Ocean

For some reason, downloading packages using apt-get install was unusually slow on DigitalOcean this week, barely exceeding 4kbps. Since DigitalOcean droplets are configured to download packages from mirrors.digitalocean.com, all I had to do was to revert them to the default Ubuntu sources using these two commands:

sudo sed -i "s/mirrors.digitalocean/archive\.ubuntu/g" /etc/apt/sources.list
sudo apt-get update

Downloads are now as fast as they should be.

3 comments on “How to speed up apt-get on Digital Ocean

  1. This is still unusually slow. I was suspecting the mirror servers, but nice to see this quick fix. Download went from 8 hours to 17 minutes.

    Thanks

  2. Hello there how to fix this same issue but in debian, I’m currently using this source list:

    #------------------------------------------------------------------------------#
    # OFFICIAL DEBIAN REPOS
    #------------------------------------------------------------------------------#

    ###### Debian Main Repos
    deb http://ftp.au.debian.org/debian/ jessie main contrib
    deb-src http://ftp.au.debian.org/debian/ jessie main contrib

    ###### Debian Update Repos
    deb http://security.debian.org/ jessie/updates main contrib
    deb-src http://security.debian.org/ jessie/updates main contrib

    THE SPEED LIMIT IS 9.151B/s !!!!

Leave a Reply to Nik Cancel reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax