Your submission was sent successfully! Close

Snapcraft corner: Staying on track

Snapcraft channels and, consequently, tracks are an important, highly useful element of the snap ecosystem. Tracks enable snap developers to publish multiple supported releases of their application under the same snap name. All snaps must have a default track – called latest, but there can be many others, giving both developers flexibility in how they release their applications to end users.

So far, track management was only possible through the Snap Store Web interface, which we have extensively reviewed last week. Now, you can view tracks, and very shortly, you will also be able set the default track using the snapcraft command line. We wanted to use this opportunity to showcase this upcoming set of features.

Ready, snap, set

The first thing you may want to do is check the availability of existing tracks for a given snaps. This can be done using the snapcraft list-tracks command (snapcraft 4.2 onwards), for instance:

snapcraft list-tracks node
Name    Status    Creation-Date         Version-Pattern
latest  active    -                     -
6       active    2018-02-27T13:25:05Z  -
8       active    2018-02-27T13:26:02Z  -
9       active    2018-02-27T13:26:08Z  -
10      active    2018-02-27T13:26:19Z  -
11      active    2018-10-31T16:25:48Z  -
12      default   2019-04-26T13:15:26Z  -
13      active    2019-10-18T13:34:01Z  -
14      active    2020-04-23T10:45:32Z  -

Now, as a publisher, if you want to change the default track of your application (snapcraft 4.3 onwards), you can also accomplish this on the command line – the specified default track must already exist, though.

snapcraft set-default-track “snap” “track”
snapcraft set-default-track kompozer legacy
Default track for 'kompozer' set to 'legacy'.

This can be quite useful if you’re managing multiple (supported) releases of your applications, or if you want to automate the functionality through a CI/CD system. Furthermore, publishers with a large number of snaps should also find this of value.


Snapcraft is constantly gaining new capabilities, designed to simplify and accelerate the process of snap publication. The elegance of the tool is that it provides both application development and Snap Store features, allowing you to accomplish a significant portion of your snap journey right there, in the terminal window. Default tracks are just the latest example. More good things are coming, so stay tuned. Meanwhile, if you have any requests or suggestions on what snapcraft ought to do, please join our forum for a discussion.

Photo by Borna Bevanda on Unsplash.

Ubuntu desktop

Learn how the Ubuntu desktop operating system powers millions of PCs and laptops around the world.

Newsletter signup

Select topics you're
interested in

In submitting this form, I confirm that I have read and agree to Canonical's Privacy Notice and Privacy Policy.

Related posts

Ubuntu Frame – A picture is worth a thousand snaps

The development of graphical applications intended for use on IoT devices isn’t trivial. The complexity goes beyond the usual challenges that exist in the...

Craft Parts – Reusable code, Snapcraft style

Throughout the ages, humans have always used simpler tools and materials to create more complex ones. Wood and stone for smelting bronze and iron; iron to...

Snapcraft offline mode – Build snaps while saving data

As part of the snap creation cycle, the Snapcraft tool creates isolated build instances inside which all of the necessary work – download of sources,...