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.
Block the store in your
For me what worked was
sudo nano /etc/hosts, copy-pasted the line, then I hit F2, then Y, then ENTER.
Disable automatic updating if the network connection is metered.
First, go to your 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.
Finally, open a terminal and type (docs):
sudo snap set system refresh.metered=hold
There are a couple of options, depending on what you want exactly.
An update broke my application!
snap revert package-name to go back to the previous version of that application. You will stay on that version until the next version of the app gets released. If the next version is broken too, you can run
snap revert again.
I want to stick with an older version of the app
Many software in the snap store uses tracks for major software releases. Most snaps default to using the
latest/stable track, which will give you the latest updates of the application once they are released but users can choose a different track to stick with a specific version.
For the CLion IDE, for example, you can see the supported tracks by running
snap info clion. You can switch to a different track by running
snap refresh clion --channel=2020.2/stable. You will stay on that track until you manually change to a different track. You will still get automatic updates for the application but depending on which track you choose, you will only get the minor updates for that specific version of the software.
Publishers decide whether or not to enable tracks in their snap, so if a snap you like doesn't have a track for the version you need, be sure to contact the publisher!
I want to check updates before I install them
In this case, you probably want to change the refresh timer. For example, the following option sets the refresh timer to the last Friday of the month, from 23:00 to 1:00 the next day. This gives you a lot of time to check the updates and install them manually.
sudo snap set system refresh.timer=fri5,23:00-01:00
You can use the CLI tools or the snap store to see which updates are available.
I want to hold all updates until after my big presentation
The "hold" option is what you need. You specify an exact date and snap will hold any updates until that date. For example, this holds updates for the next 30 days.
sudo snap set system refresh.hold="$(date --date='today+30 days' --iso-8601=seconds)"
Note: the maximum number of days you can hold updates for is 60.
I want to disable updates when I'm paying for my download bandwidth
By default, snap will not update when NetworkManager detects a metered connection such as an LTE/3G/4G. If NetworkManager does not detect it correctly, you can set it manually.
I want to disable updates while the application is running.
This is an experimental feature you can turn on by running the following command:
snap set core experimental.refresh-app-awareness=true
For more info, see snap refresh awareness and update inhibition
I want to do something else!
See the Controlling updates docs for more options.
Do you need another configuration option? Join the discussion in how to control snap updates on the desktop.
Stop (will restart on boot), then disable the
sudo systemctl stop snapd.service sudo systemctl mask snapd.service
mask is a stronger version of
To re-enable and refresh:
sudo systemctl unmask snapd.service sudo systemctl start snapd.service sudo snap refresh
refresh will refresh all snaps in the system.
This is a summary of much better answers than any given here. For some reason ~that~ question was marked as duplicate pointing back to this one :).
One workaround may be to install from a version specific channel, i.e. for PyCharm:
snap install pycharm-professional --channel 2018.3/stable --classic
Then the snap will not be updated unless a new patch version to 2018.3 is released.
To see the channels available, use
snap info, i.e.
$ snap info pycharm-professional name: pycharm-professional summary: Python IDE for Professional Developers publisher: jetbrains✓ contact: https://www.jetbrains.com/pycharm/documentation/ license: unset description: | PyCharm Professional Edition is an IDE for professional Python development. It is designed by programmers, for programmers, to provide all the tools you need for productive Python, Web and Scientific development. PyCharm Professional Edition is available for a free 30-day evaluation. Monthly and yearly subscription options are available for companies and individual users. Find out more on https://www.jetbrains.com/pycharm/buy/ commands: - pycharm-professional snap-id: Uqpw0ZWqy6Wh4mgaWE0rxgM5tAGCwf4D tracking: stable refresh-date: 10 days ago, at 09:22 PDT channels: stable: 2019.1.1 2019-04-03 (127) 392MB classic candidate: 2019.1.1 2019-04-03 (127) 392MB classic beta: 2019.1.1 2019-04-03 (127) 392MB classic edge: 2019.1.1 2019-04-03 (127) 392MB classic 2019.1/stable: 2019.1.1 2019-04-03 (127) 392MB classic 2019.1/candidate: 2019.1.1 2019-04-03 (127) 392MB classic 2019.1/beta: 2019.1.1 2019-04-03 (127) 392MB classic 2019.1/edge: 2019.1.1 2019-04-03 (127) 392MB classic 2018.3/stable: 2018.3.5 2019-02-27 (121) 355MB classic 2018.3/candidate: 2018.3.5 2019-02-27 (121) 355MB classic 2018.3/beta: 2018.3.5 2019-02-27 (121) 355MB classic 2018.3/edge: 2018.3.5 2019-02-27 (121) 355MB classic 2018.2/stable: 2018.2.8 2019-04-12 (128) 313MB classic 2018.2/candidate: 2018.2.8 2019-04-12 (128) 313MB classic 2018.2/beta: 2018.2.8 2019-04-12 (128) 313MB classic 2018.2/edge: 2018.2.8 2019-04-12 (128) 313MB classic 2018.1/stable: 2018.1.6 2018-11-15 (101) 314MB classic 2018.1/candidate: 2018.1.6 2018-11-15 (101) 314MB classic 2018.1/beta: 2018.1.6 2018-11-15 (101) 314MB classic 2018.1/edge: 2018.1.6 2018-11-15 (101) 314MB classic 2017.3/stable: 2017.3.7 2018-11-15 (100) 344MB classic 2017.3/candidate: 2017.3.7 2018-11-15 (100) 344MB classic 2017.3/beta: 2017.3.7 2018-11-15 (100) 344MB classic 2017.3/edge: 2017.3.7 2018-11-15 (100) 344MB classic installed: 2019.1.1 (127) 392MB classic
The refresh service is launched by systemd and configured in:
If you want to disable the autorefresh, override those configurations in /etc/systemd. Probaby the easiest way is to just set the timer to the frequency you like.