Ade Malsasa Akbar contact
Senior author, Open Source enthusiast.
Tuesday, October 22, 2019 at 23:46

Do you know that Ubuntu silently downloads updates in the background? It may transfer around 100-200MB in random period of time and happen almost everyday. This will hurt users with limited internet access who do not want updates or prefer to upgrade manually. And do you know that you can disable that? Disabling them helps saving your internet bandwidth really a lot. This tutorial explains how to do it. By disabling here we will disable permanently certain services so that it will not active anymore unless we deliberately enable them manually. Okay, so let's go!

Subscribe to UbuntuBuzz Telegram Channel to get article updates directly.

On Ubuntu 19.10: Download Links | Install Guide | Review | GNOME 3.34 | Unity Desktop | WTDAI

1. Disable Things Graphically 

You can disable several aspects (not all) of automatic updates using the Software & Updates tool. It's the blue circle logo with white 'A' letter on start menu or actually named software-properties-gtk on Terminal. Change the options 'Automatically check' and 'Notify me' to Never.

2. Disable Snapd

This is the culprit if you wonder why your bandwidth suddenly "swollen" without your concern. And this is why I like network indicator and always recommend it in many articles. If you do not use Snap, you are safe to disable snapd.
$ sudo systemctl mask --now snapd

3. Disable Packagekitd

This is also the culprit following snapd. If you prefer install and upgrade everything manually, either with command lines or Synaptic, you are safe to disable packagekit daemon.
$ sudo systemctl mask --now packagekit 

4. Disable Unattended-Upgrade

This is the third culprit that really eats up your bandwidth in the background. If you prefer upgrade done manually, you can disable unattended-upgrade.
$ sudo systemctl mask --now unattended-upgrade

5. Disable APT-Daily

This is the fourth culprit that also burden your bandwidth. You do not need this to run the system.
$ sudo systemctl mask --now apt-daily.service apt-daily.timer

6. Disable Non-Software Data Downloads

This one is not automatic service like above, but, it burdens your apt-get update too much, as it downloads so many things unnecessary to install software with either command line or Synaptic. Particularly, it makes you download huge index files of metadata; like indexes of icons, languages, and screenshots; that are only useful with fancy package manager like Ubuntu Software Center (USC). If you do not use USC, you can disable them.
$ mkdir ~/Public/apt.conf.d/ #create a backup folder on your $HOME
$ cp /etc/apt/apt.conf.d/* ~/Public/  #backup all config files
$ sudo rm /etc/apt/apt.conf.d/10periodic #first
$ sudo rm /etc/apt/apt.conf.d/20auto-upgrades #second
$ sudo rm /etc/apt/apt.conf.d/20packagekit #third
$ sudo rm /etc/apt/apt.conf.d/20snapd.conf #fourth
$ sudo rm /etc/apt/apt.conf.d/50appstream #fifth
$ sudo rm /etc/apt/apt.conf.d/50unattended-upgrades #sixth
$ sudo rm /etc/apt/apt.conf.d/60icons #seventh

Reverting Back

If you can disable it, you can enable it again. You just need to change mask with unmask from commands above.
$ sudo systemctl unmask --now snapd
$ sudo systemctl unmask --now packagekit 
$ sudo systemctl unmask --now unattended-upgrade
$ sudo systemctl unmask --now apt-daily.service apt-daily.timer

Restore the configuration files that deleted:
$ sudo cp -v -n ~/Public/apt.conf.d/* /etc/apt/apt.conf.d/ #restore them without overwriting existing files

Do you know more tips or corrections? Please suggest me on comment section below. Thanks and happy working!

This article is licensed under CC BY-SA 3.0.