44

I am downloading a very large package and my internet connection isn't the fastest, so browsing the web at the same time is a pain. How can I limit the bandwidth apt-get uses?

Isaiah
  • 60,750

1 Answers1

77

A trick I picked up when adjusting someone else's computer:

  • For temporary limits, add the -o flag to your apt-get command:

    sudo apt-get -o Acquire::http::Dl-Limit=25 install <package>
    
  • For permanent throttling, create the file /etc/apt/apt.conf.d/75lowerspeed and save the following in it:

    Acquire
    {
       Queue-mode "access";
       http
       {
          Dl-Limit "25";
       };
    };
    

Both methods limits apt-get to 25 kBps (kilobytes per second).

αғsнιη
  • 36,350
Rinzwind
  • 309,379