Behaviour change: sticky and default tracks

As of version 2.44TBC, there are a couple of small but noteworthy changes of behaviour coming to snapd:

  1. snap publishers can set a default track for their snap that is different from latest. This default track can change over time. With this a snap publisher can have versioned tracks, with default pointing to whatever is the most recent stable (meaning somebody doing snap install will always get that most recent stable version), but once installed a change to the default track won’t affect the installed snap, meaning that it will continue to track the version that it installed until an admin decides to version-hop. This is already live in the store, if anybody wants to look at what it looks like, what remains is snapd-side work.
  2. when asking for a refresh or a switch specifying only a risk (i.e. one of stable, candidate, beta, or edge), the track that the snap is following will not be changed. Previously stable was a shorthand for latest/stable, but that turns out to be counter-intuitive with users being surprised by this. So if you install, say, lxd from track 4.0/stable (either explicitly using --channel=4.0 or by 4.0 being the default track as per above), and then do snap refresh lxd --candidate, you’ll find that lxd will now be tracking 4.0/candidate, as most people would expect. This change is purely on snapd’s side. Note this is a redo of Behavior change: risk-only channel specifications will not switch track!, which was retracted after some corner case issues.

☒ sticky tracks on master
☒ default tracks on master
☐ default track explicit in snap info? (TBC)
☐ documentation updates


Until snapcraft support for this lands, one can set the default-track using surl as follows:

 surl -d'{"default_track":"2.7"}' -a prod -s production -e -p package_update --header Snap-Device-Series:16$SNAP_ID/metadata

as per

1 Like

Note that until 2.44 is in wide spread use, latest is what will get installed still by current snapd.

1 Like

Is there a tool/web interface allowing for setting the default track?$your-snap/releases supports it

I must be blind, I do not see any reference there to “default track”.

On the$your-snap/releases you have to first select the track you want to set as default. Then you should see a “Set as default track” to the right.

Thank you @sparkiegeek for reaching out.

1 Like