Imagine that, I have a fresh Ubuntu 18.04 installed. But there are some default packages or services that connects to the Internet without my consent. How to get rid of them completely or make them offline in an effective way?

As far as I now, they are:

popularity-contest - The Ubuntu Popularity Contest (or popcon, in short) gathers statistics determining which packages are the most popular with Ubuntu users.

unattended-upgrades - Automatically upgrades computer with the latest security updates.

apt-daily - Updates apt index every day automatically.

snapd - Updates snap packages automatically.

update-manager - Checks for release updates.

I could be missing something. Please post if you know...

The purpose: I want to have full control over the Internet, as in my case, Internet is limited. So, I wish to update or upgrade manually rather than automatically.


Popularity contest is disabled by default. You can check and disable it with:

dpkg-reconfigure popularity-contest 

You can do ...

apt remove popularity-contest

to remove it too.

Disable apt-daily.service:

systemctl stop apt-daily.timer
systemctl disable apt-daily.timer
systemctl disable apt-daily.service
systemctl stop apt-daily-upgrade.timer
systemctl disable apt-daily-upgrade.timer
systemctl disable apt-daily-upgrade.service

One-liner from @muru <3:

systemctl disable --now apt-daily{,-upgrade}.{timer,service}

Disable unattended upgrade:

dpkg-reconfigure -plow unattended-upgrades

Update manager can only be stopped by removing it:

apt purge update-manager-core

You can NOT disable automatic update for snaps. You can set the period when it updates with snap set core refresh.schedule=<spec> but the system will ignore this is if it took too long to update snaps and that would be within 24 hours. This will remove anything snap related:

apt purge snapd ubuntu-core-launcher squashfs-tools

A less intrusive method would be to prevent connection to the server by adding a DENY to your firewall rules (or in the router). To disable the systemd service would be ...

systemctl disable snapd.refresh.service

but that too seems to ignore the 24 hour period.

Regarding snaps:

The agreed semantics to be implemented are the following:

  • Refreshes may be scheduled at an arbitrary weekday and time within the month (e.g. second Tuesday between 1pm and 2pm).
  • Refreshes may be deferred for up to another month so that missed windows and re-scheduling may happen without strange side effects. For example, if it was scheduled for the first day, and then gets scheduled for the end of the month just before it happens, there may effectively be a two months window without refreshes.
  • If the system remains out-of-date after the two months window, the system will start attempting to refresh out of the window.
  • That maximum window is reset every time the system is refreshed, so out-of-band updates may performed at a convenient maintenance window.

So a window of 2 months is possible if you do not reboot.

I do disagree with your way of thinking though. Except for contest (and that one is not active) all of these are about fixing bugs and providing better content. You will make your system LESS secure by disabling these options.

  • 7
    You can stop and disable the apt-daily units in one command using systemctl disable --now: systemctl disable --now apt-daily{,-upgrade}.{timer,service} – muru Jul 19 '18 at 7:05
  • 6
    @Rinzwind, It may make my system less secure, but, in my case, Internet is limited sometimes. So, it could be better to manually update or upgrade my system. – Olimjon Jul 19 '18 at 7:08
  • @Olimjon I myself would opt for another operating system that does not depend on internet. Ubuntu IS an operating system that has a high dependency on connection to the web. – Rinzwind Jul 19 '18 at 8:23
  • 2
    @Rinzwind I don't think that is good advice. All major OS' rely on the internet for security updates. The OP has limited internet, so "I do disagree with your way of thinking" seems irrelevant here. It's not a way of thinking, it's a physical constraint. +1 for an otherwise good answer though. Is it really impossible to disable snap updates without uninstalling it or using the firewall? That seems rather against the philosophy of Linux generally. – Jon Bentley Jul 19 '18 at 10:42
  • 5
    The snap part looks like a serious problem of snap. Having no control over updates proved i.e. in chrome to be a major danger (where extensions suddenly injected ads and the user did not know that its from an extension as he did not know the extension was updated). Maybe someone has a patched version of snap? – allo Jul 19 '18 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.