snaps

Keith keith at caramail.com
Sat Jan 7 19:24:30 UTC 2023


On 1/7/23 10:26 AM, Jay Ridgley wrote:
> Good morning,
> 
>    Is there a way to change the snap updates to be non-automatic?
> 
>    I have tried to manually apply them using sudo snap refresh, the
> message "All snaps up to date." is returned. Yet, I also get a message
> that there is a snap update pending x days ahead.
> 
>    I want to be able to do updates when I want, NOT automatically.
> 
> Currently running:
> Distributor ID:	Ubuntu
> Description:	Ubuntu 22.04.1 LTS
> Release:	22.04
> Codename:	jammy
> 
> Cheers,
> Jay

https://snapcraft.io/docs/keeping-snaps-up-to-date

In a two or three more days, snapd is scheduled to be updated to version 
2.58 in the stable channel. This version will add the option "--hold" to 
the snap refresh command. So if want to stop automatic snap updates 
indefinitely, you'd issue "sudo snap refresh --hold=forever". 
Personally, I think that's a not-so-smart idea, but whatevs. The full 
syntax is

$ sudo snap refresh --hold=<duration> <snap1> <snap2>...

As you can see above, the user now has the ability to hold the refresh 
time for individual snaps. This will allow the automatic updates to the 
non-interactive snaps like the various runtimes to continue while 
holding the refresh of an interactive snap like Firefox until such time 
as the user manually updates it or sets the period of time when an 
refresh should occur.

Of course, you could always set refresh timer for when automatic 
refreshes occur. One time I got nostalgic for Microsoft's Patch Tuesday 
and so set snap refreshes to occur on the second Tuesday of the month at 
10am. That was a little too infrequent, so I settled for one time early 
in the morning on Wednesdays and Saturdays.

To turn off the notifications about pending updates go 
Settings->Notifications->Snapd-User-Session-Agent. There, either turn 
off notifications altogether, or just the notification popups. The 
latter choice will still allow notifications by showing a bell symbol 
next to the date/time and a notification will show up in the 
notifications list.

-- 
Keith




More information about the ubuntu-users mailing list