14

The Snap "Pending update of X snap" / "Close the app to avoid disruptions" notifications are distracting and not useful to me since none of my snap apps are at risk of losing data if they autoclose. How do I disable the notifications?

3
  • The simplest way is to --believe it or not-- close the app and then refresh the snap. If you disable or ignore the notifications, then when the 14-day timer reaches zero that application will terminate without warning, losing any unsaved data.
    – user535733
    Commented Sep 1, 2022 at 21:56
  • 2
    I don't use snaps for anything that can lose data, so in my case this is fine. That is, the cost of distracting notifications >> cost of reopening an app on occasion. Commented Sep 2, 2022 at 4:17
  • @user535733 That's the simplest fix on the short-term. On the long-term I don't want to be distracted multiple times a week about some app update I don't care about.
    – DBedrenko
    Commented Apr 3, 2023 at 14:15

2 Answers 2

12

Use snap refresh --hold=forever to prevent snap from searching for updates; this ought to prevent apps from auto-updating and closing without warning. Use this at your own risk though because some software updates aren't useless.

Use snap refresh --unhold to re-enable refreshes.

If you would prefer to not be annoyed every 6 f*$@ing hours (is this really a sensible default, snap people!?) about updates, but still want updates sometimes then use sudo snap set system refresh.timer=sun,23:00-24:00 to only check for updates on Sunday around midnight. Monday morning is the right time for being annoyed about this stuff.

3
  • 1
    While this doesn't directly answer the question of how to disable the notifications, it's a closely related problem of controlling when snap updates occur (and I think your answer would also stop the notifications as a side effect?). I use a different means that is a little more aggressive / hacky / maybe future proof, editing the /etc/hosts file to block api.snapcraft.io until I am ready to update. Good to know there is a more official CLI command approach which has added flexibility of setting a automated schedule. Commented Nov 20, 2022 at 1:04
  • 1
    @Thismatters please how to move "snap set system refresh.timer" in default value ?
    – McPeter
    Commented Feb 3, 2023 at 23:25
  • 1
    snap refresh --time will display the current settings on your system. By default, it's set to 00:00~24:00/4, which results in a check every 6 hours. Snapcraft has a page describing the timer string format here snapcraft.io/docs/timer-string-format
    – Mike Hicks
    Commented Apr 24, 2023 at 15:12
10

Important note: you will not receive notifications about pending snap updates and the apps will eventually autoclose, potentially losing data depending on the nature of the app. If you want to control when snap updates occur rather than simply disable notifications, see this other answer.

In GNOME you should be able to go to Settings > Notifications > Snapd User Session Agent and turn them off from there.

enter image description here

To manually update snaps you can either occasionally visit Ubuntu Software > Updates or run snap refresh in the terminal. If you are more tech savvy you can also change when the background update checks occur and automate refreshes, though to my knowledge you will still have to close apps before they can be upgraded: https://snapcraft.io/docs/keeping-snaps-up-to-date

Hopefully in the future Snap will evolve to have a more behind-the-scenes update process that only pester the user for rare critical changes, similar to mobile app stores or even Ubuntu's original package manager apt. For now we will have to deal with the degraded user experience snaps have created, or else remove all snaps and rely on apt.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .