Channels

There is some discussion about all snaps having a latest track by default and that if not specified otherwise, that is the default (sorry for the confusing phrasing).

Could some documentation be added about the “configurable default track” functionality?

If a snap already has some tracks created, one of them can be designated as the “default track” instead of latest. This is the track that the snap will be installed from, if a track is not specified explicitly.

Example, assuming snap superfoo has a 2.0 track in addition to latest:

snapcraft set-default-track superfoo 2.0

Now, an “implicit track” install will install from 2.0 instead of latest:

snap install superfoo

But note that the default track does NOT remove latest; latest is never a pointer to another track. So this will still install from latest:

snap install superfoo --channel=latest

Thanks for this. We had something vague like Without the snap developer specifying otherwise, but I’ve added a little to this page to hopefully make it clearer.

I’ve also added a section to our Publish to a branch page on setting a track as default: Publish to a branch

I believe something went wrong in the middle of the sentence.

Fixed, thanks for flagging this!