Ubuntu: Limiting Download Speed in Synaptic Package Manager

Michael Mann
It is often annoying to be sharing an Internet connection, say at a local WIFI hotspot and have the update manager popup on me, informing me there are updates to Ubuntu. This means that for the next how ever long I will be sucking up as much bandwidth that might be available, depriving others of much needed banwidth for whatever it is they are doing. Nothing is more annoying to me then being seen as a bandwidth hog. Unfortunately, Ubuntu does not offer a feature to throttle back the speed, at least not in the GUI.

There is a method of throttling back the speed, which is available whether you use Synaptic, the update manager, or apt-get (aptitude) through the command line interface. Unfortunately, it involves using the command line and requires a file be created.

Open the command line (Applications > Accessories > Terminal). In the terminal window that opens, enter (or copy and paste):

gksu gedit /etc/apt/apt.conf.d/76download

This will open this non-existent file in gedit, but first prompt for the user password in the gui. If you wish to stay in the command line for the password, substitute sudo in place of gksu.

In the blank file, copy and paste the following:

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

Dl-Limit is where you can set the maximum speed for throttling, in kilobytes. Feel free to change the 25 to whatever you desire. This will throttle the speed for everytime you use your desired method of adding software or updating your system.

If you wish to only do this from time to time, then there is a command line option for this as well. Use the following, when you wish to throttle back:

sudo apt-get -o Acquire::http::Dl-Limit=25 upgrade

This will perform an upgrade using apt-get of the software on your system and throttle the speed back to 25KB.

My only complaint is this feature missing from the GUI, much like you can control the speed in many popular BitTorrent clients. If I could add one thing to my Christmas list this year, I would add a request for this feature from the folks behind Ubuntu/Debian.

Published by Michael Mann

With over 12 years of professional experience as a Web designer and over 25 years of general computer experience, I am often the resident tech . I own and operate Michael Mann Desktop Publishing, a desktop p...  View profile

1 Comments

Post a Comment
  • DEKiMA8/2/2010

    I was looking for some way to do this when I'm at my friends' houses, so that they can still game without some serious lag.

    Thanks for posting when you figured this out!

To comment, please sign in to your Yahoo! account, or sign up for a new account.