Disabling automatic refresh for snap from store

well, what i linked was our official documentation :slight_smile: not a workaround of any kind …

admittedly the refresh-app-awareness feature is still experimental though but will eventually land …

Well, my suggestion sounds better in my mind. Time flies (and I forget), or I go away from my current company and I forget to say to the new sysadmin : “Look! The foo package is manual because $reasons!”.

If there is something like a snap.d configuration directory like in my previous post, he will go to see this directory and he will remove or edit the configuration.

Because it seems the solutions proposed right now is global, but something like this could be needed:

  • Package foo: will update every x time
  • Package bar: will never update automatically. Only when I tested on the staging server.
  • Package lorem: will update normally

obviously this is all IMHO :slight_smile:

3 Likes

You can always move to a flatpak
Unless blocking snap in the hosts file is a valid option

Maybe the below link will help you.
https://discuss.linuxcontainers.org/t/disable-snap-auto-refresh-immediately/5333

I’ve spent months hunting down why my multi-day jobs on microk8s often fail.
Someone in microk8s said an update occurred at about the same time as one of my crashes.
Is there a log of snap update activity?
Is there no way for me to schedule the updates for when it’s convenient?

snap changes

has the logs from snapd (for the last 72h or so)

to schedule updates you can use refresh.timer or refresh.hold:

thanks, what does this mean

snap changes
ID   Status  Spawn                   Ready                   Summary
382  Done    yesterday at 18:08 CST  yesterday at 18:08 CST  Running service command for snap "microk8s"
383  Done    yesterday at 18:08 CST  yesterday at 18:08 CST  Running service command for snap "microk8s"
384  Done    yesterday at 18:08 CST  yesterday at 18:08 CST  Running service command for snap "microk8s"
385  Done    yesterday at 18:08 CST  yesterday at 18:08 CST  Running service command for snap "microk8s"
386  Done    yesterday at 18:08 CST  yesterday at 18:08 CST  Running service command for snap "microk8s"

Also, whould anyone know if microk8s is dependent on other snap packages? I’m not sure what constitues a snap package.

likely that someone started/stopped/restarted the snap, you can get log details when using the ID (first column) like:

snap change 123

again, thank you.

From this, looks like snap can be daemons or app. Is this correct ?

snap change 382
Status  Spawn                   Ready                   Summary
Done    yesterday at 18:08 CST  yesterday at 18:08 CST  restart of [microk8s.daemon-etcd]

john@john-trx40-designare:/var/log$ snap change 383
Status  Spawn                   Ready                   Summary
Done    yesterday at 18:08 CST  yesterday at 18:08 CST  restart of [microk8s.daemon-containerd]

john@john-trx40-designare:/var/log$ snap change 384
Status  Spawn                   Ready                   Summary
Done    yesterday at 18:08 CST  yesterday at 18:08 CST  restart of [microk8s.daemon-apiserver]

yes, snaps can contain daemons, apps or simply data … you should start a new thread if you want to go on discussing this though, it is kind of offtopic for this (already huge) “automatic refresh” thread …

1 Like

good point. I’ll create a new topic to better understand the frequency and scope of updates.

I beleive on topic, is the “Software & Updates” ubuntu app, 3rd tab called “Update” referring to snap?
The first line “Snap packages update are checked routinely and installed automatically” implies so.
The 2rd selector “automatically check for updates” implies it will turn off snap updates.
I had set this to never at the start of my debugging window and this morning it was back to “daily”.

The link ogra https://snapcraft.io/docs/keeping-snaps-up-to-date#heading–refresh-hold does not describe a UI. Is this the same thing?

the Software and updates app only applies to apt/deb packages (with teh exception of the livepatch tab), to my knowledge there is no GUI for the snapd settings currently.

1 Like

So the text “Snap packages updates are checked routinely and installed automatically” over the dropdown to control frequency of updates mean “snap package updates not controlled by this page, these setting apply to things other than snap”.

Yikes, how misleading.

This is INSANE. I’ve been using snaps for a year or two, and this is the first I heard about this “feature”. You are auto updating packages? behind my back? no way to disable it? Even google’s Play Store allows disabling updates.

As a fellow software developer, I know you have the right to do whatever you want with the software you develop. Alas, this type of condescending behavior is clearly unacceptable for most of the community. Just think of apt auto updating your packages without a kill switch.

1 Like

Hi all. Sorry for I couldn’t read all the thread, just a dozen of messages.
It’s started a while ago, and now it’s 2021 April.

The latest version of my main desktop IDE - WebStorm - has a few severe issues which basically prevent me from working effectively in any way. So I had to install the previous version and fortunately it’s done easily:

$ sudo snap install webstorm --channel=2020.3/stable --classic

But actually it’s not the first time when I stumble upon this issue. In the past I experienced similar blockers and for the exactly same reason: new version turns to be too glitchy.

I’ve been struggling to disable auto-updates for the last few years but couldn’t find a way.

Tell me please, how to freeze a package to prevent its auto-updating?

1 Like

It’s simply not possible, that’s why we have this thread in the first place.

There’s a workaround. If you download the specific version you want and install using --dangerous flag, it would stay at that version forever. You might give it a try.

$ snap download <package> --channel=<channel>
$ snap install <package> --classic --dangerous

I believe it is something like this.


Ivo

What happens if I set my desktop computer to update from from 3am to 4 am when my desktop is always shutdown. For example if I set:
sudo snap set system refresh.timer=3:00-4:00/1

What will happen?
a) snap on my desktop will never automatically update, because my desktop is shutdown at that time
b) snap will try to update automatically as soon I start computer next time

Both of them are true. snapd can’t update snaps because the host is shut down, but it attempts to update the app as soon as possible.

2 Likes