/usr/lib/apt/methods/http eating my bandwidth!

I've noticed (using nethogs), that /usr/lib/apt/methods/http has multiple processes, which consume ALL of my bandwidth. I want to disable the process(es).

I've tried everything: trickle, killall, etc., but nothing has worked.

How can I solve this problem?


Solution 1:

It is because, in Ubuntu 16.04 when there are security updates available for it, it automatically downloads and install them without notifying the user.

To disable this functionality you can visit Software & Update and under Update tab, change when there are security updates to Display immediately.

enter image description here

Solution 2:

apt does have (or at least, did have) configurable options for this. Run this from a terminal.

sudoedit /etc/apt/apt.conf.d/76download

And paste in the following:

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

That will limit apt-get (over HTTP) to 50KB/s but just change the Dl-Limit value to whatever suits your circumstances best. Save the file and you're done.