Keeping snaps up to date


Automatic refresh

By design, non-devmode snaps installed from the store are automatically updated on a regular cadence. By default, the snapd daemon checks for updates 4 times each day.

Controlling refresh frequency

Sometimes the user wishes to have snaps refresh at known times, rather than the default. This can be achieved with the snap set system refresh.timer command. The user can specify a range of days or times when they’d prefer refreshes to occur. The following example sets the snapd daemon to refresh snaps only between 4AM and 7AM and between 7PM and 10:10PM.

$ snap set system refresh.timer=4:00-7:00,19:00-22:10 

Examples of possible refresh timers:

Options Result
mon,10:00,,fri,15:00 Mondays at 10:00, Fridays at 15:10
mon,fri,10:00,15:00 Mondays at 10:00 and 15:00, Fridays at 10:00 and 15:00
mon-wed,fri,9:00-11:00/2 Monday to Wednesday and on Friday, twice between 9:00 and 11:10
mon,9:00~11:00,,wed,22:00~23:00 Mondays, some time between 9:00 and 11:00, and on Wednesdays, some time between 22:00 and 23:00
mon,wed Monday and on Wednesday, at 0:00
mon2-wed2,23:00-24:00 Monday through Wednesday on the 2nd week of the month, between 23:00 and 24:00
fri5,23:00-01:00 Last Friday of the month, from 23:00 to 1:00 the next day

See Timer string format for a comprehensive breakdown of the syntax used to define times and frequencies.

Manual refresh

Users can force-check and update snaps with snap refresh

$ snap refresh
gnome-system-monitor 3.28.2 from 'canonical' refreshed
gnome-calculator 3.28.2 from 'canonical' refreshed
flock-chat 2.2.192 from 'flock-chat' refreshed
gnome-characters 3.28.2 from 'canonical' refreshed

Once a refresh has happened, use the snap changes and snap change <num> command to get details about what changed.

$ snap changes
ID    Status  Spawn                   Ready                   Summary
2052  Done    today at 09:34 BST      today at 09:35 BST      Auto-refresh 7 snaps
2053  Done    today at 15:16 BST      today at 15:17 BST      Refresh snaps "gnome-calculator", "flock-chat", "gnome-characters", "gnome-system-monitor"
$ snap change 2053
Status  Spawn               Ready               Summary
Done    today at 15:16 BST  today at 15:16 BST  Ensure prerequisites for "gnome-calculator" are available
Done    today at 15:16 BST  today at 15:16 BST  Download snap "gnome-calculator" (199) from channel "stable"
Done    today at 15:16 BST  today at 15:16 BST  Fetch and check assertions for snap "gnome-calculator" (199)
Done    today at 15:16 BST  today at 15:16 BST  Start snap "gnome-system-monitor" (54) services
Done    today at 15:16 BST  today at 15:16 BST  Clean up "gnome-system-monitor" (54) install
Done    today at 15:16 BST  today at 15:16 BST  Run configure hook of "gnome-system-monitor" snap if present

Proposed new documentation outline
Snap documentation
Snap Documentation (page deprecated)