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, 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.


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


    ###### Debian Main Repos
    deb jessie main contrib
    deb-src jessie main contrib

    ###### Debian Update Repos
    deb jessie/updates main contrib
    deb-src jessie/updates main contrib

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

Leave a 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](

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

Here is some inline `code`.

For more help see