Ubuntu – How to disable autorefresh in snap

snap

Is it possible to disable autorefresh in snap? This link says that Snaps are updated automatically in the background to the latest version, every day. Some snaps (e.g. vlc) are built daily, and it makes no sense to install them every day.

Best Answer

It is at the time of this writing not possible (officially), which has stirred quite a debate. Better ways to control updates on the desktop are still being discussed.

Solution 1

Block the store in your /etc/hosts/ file:

127.0.0.1 api.snapcraft.io

For me what worked was sudo nano /etc/hosts, copy-pasted the line, then I hit F2, then Y, then ENTER.

Solution 2

Disable automatic updating if the network connection is metered.

First, go to your network settings.

Network settings

Then, click on the cog wheels on the right side of both of your network interfaces and tick "restrict background data usage" - this marks the connection as being metered.

Restrict background data

Finally, open a terminal and type (docs):

sudo snap set system refresh.metered=hold