Snap channels are written like `latest/stable` and `18/candidate`. What do the two components mean, what are the four risk levels, and what does running `snap refresh --channel=18/stable <snapname>` actually change?
answer
- two components separated by a slash
- one names a parallel version series
- the other names how risky
- stable, candidate, beta, edge
- tracking follows the channel, not a revision
basics
~20 sA snap channel is track/risk. The track names a parallel version series, such as latest or 18; the risk is stable, candidate, beta or edge. Refreshing with --channel switches which series the snap follows and installs that channel's current revision.
solid answer
~40 sA channel name is `<track>/<risk>` — optionally `<track>/<risk>/<branch>`. The **track** is a version series the publisher maintains in parallel, defaulting to `latest`; a publisher may also offer tracks such as `18` or `2.4` so you can stay on a major line. The **risk** is one of `stable`, `candidate`, `beta`, `edge`, in descending order of maturity. A **branch** is a short-lived side channel for a fix and expires after about 30 days of inactivity. `snap info <name>` lists the channels and the revision published on each; `snap list` shows what each installed snap is Tracking. `snap refresh --channel=18/stable <name>` changes the tracked channel and refreshes to whatever revision sits there now — and every later automatic refresh follows that channel. It is a series selector, not a version pin.
code
bash · 8 lines# What channels exist, and what is on each?
snap info node
# What is this installation following right now?
snap list
# Move onto a major-version track and refresh to it
sudo snap refresh --channel=18/stable nodego deeper
Be able to read snap info and snap list, name the four risk levels in order, and say that the part before the slash is the track and the part after is the risk.
Explain that switching channels both changes what is tracked and refreshes immediately, and that a channel selects a moving series rather than pinning a revision. Know that non-latest tracks exist only if the publisher created them.
Show the operational instinct: choose a numbered track on servers so a major-version jump is a decision rather than an overnight surprise, and know what a sideloaded x-revision installation does and does not do.
Own the standard across the fleet — which snaps are permitted, which track each one follows, how that choice is recorded in configuration management, and who is accountable when a publisher retires a track you depend on.
## The grammar A snap channel is written `<track>/<risk>` and may carry a third component, `<track>/<risk>/<branch>`. When you type only part of it snapd fills in the rest: `--channel=edge` means `latest/edge`, and `--channel=18` means `18/stable`. The four risk levels also have shorthand flags on install and refresh — `--stable`, `--candidate`, `--beta`, `--edge`. ## Risk The risk component is a fixed vocabulary of exactly four values, in descending maturity: - **stable** — what a publisher considers production-ready; the default for `snap install`. - **candidate** — release-candidate builds staged before promotion to stable. - **beta** — pre-release builds offered for wider testing. - **edge** — usually built automatically from the tip of the development branch; expect it to break. Not every snap publishes all four. `snap info` shows an unused risk as a fall-back pointer (for example `beta: ↑`), meaning that installing from it gives you the revision from the next more stable risk instead. ## Track The track is the part people get wrong. `latest` is the default track and simply means "the newest series the publisher ships" — following it will eventually carry you across a major version boundary. A publisher can request additional tracks from the store, typically named after a major version (`18`, `20`, `22`) or an upstream series (`2.4`). Tracking `18/stable` keeps you on that series and its maintenance updates and refuses to jump to 20 on its own. That is how you get long-lived stability out of a format that refreshes itself. Tracks other than `latest` exist only if the publisher created them; you cannot invent one. If `snap info <name>` lists no other tracks, `latest/<risk>` is all there is. ## Branch A branch is an ephemeral fourth component used to hand a specific fix to specific users — `latest/stable/fix-boot-hang`, for instance. Branches are not listed in the ordinary `snap info` output and expire roughly 30 days after their last upload, at which point anything following the branch falls back to the parent channel. ## Reading the current state ```bash snap info certbot snap list ``` `snap info` prints a `channels:` block mapping each channel to the version, revision and publication date currently on it. `snap list` prints one row per installed snap with Name, Version, Rev, Tracking, Publisher and Notes — the **Tracking** column is the channel this installation follows, and **Rev** is the revision it is actually on. ## What switching channels does ```bash sudo snap refresh --channel=18/stable node ``` Two things happen, and it matters that they are two: snapd records `18/stable` as the tracked channel for that snap, and it immediately refreshes to the revision published there. From then on every automatic refresh compares against `18/stable`, not against wherever you were before. `snap install --channel=...` does the same at install time. Because tracking follows the channel rather than a fixed revision, a channel is emphatically **not** a version pin. The revision on `18/stable` changes whenever the publisher promotes a new build there, and your installation will follow it. If you need a specific revision to stay put, that is a different mechanism — installing a chosen `--revision` and holding it, not a channel choice. ## Sideloaded snaps have no channel Installing from a local file with `snap install ./foo_1.0_amd64.snap` produces a revision numbered `x1`, `x2` and so on, and the snap tracks no channel at all — it will never refresh. `snap refresh --amend <name>` is the command that puts such an installation back onto a store channel. ## Why an interviewer asks The channel model is where snap's "it updates itself" behaviour meets your need to control what version runs. The correct operational instinct is to pick a track deliberately rather than accept `latest`, because `latest/stable` will one day hand a production host a new major version of the software, and nobody will have decided that it should.
- If a channel is not a version pin, how do you get one snap onto a specific revision and keep it there?Install or refresh to the revision explicitly with `snap refresh --revision=<N> <name>`, then stop refreshes from moving it with `snap refresh --hold <name>`. The channel choice alone will not do it: whatever revision the publisher promotes onto the tracked channel becomes yours on the next refresh. Note that holding a snap indefinitely also freezes its security fixes, so it is a deliberate, reviewed decision.
- What does it mean when snap info shows a risk level as an up arrow rather than a version?It means the publisher has not published anything on that risk level, so it falls back to the next more stable one. Installing from `beta` when beta shows `↑` actually gives you the `candidate` or `stable` revision. It is a signal about the publisher's release process, not a broken channel.
- Why might a team deliberately choose a numbered track over latest on a server?Because `latest` means whatever series the publisher considers newest, so following it eventually carries the host across a major version boundary with no decision from anyone. A numbered track such as `18/stable` keeps the machine on one series and its maintenance updates, so upgrades to the next major version become an explicit `snap refresh --channel` you schedule.
saying these in an interview costs you the question
- Thinks the track number is a revision number
- Believes stable channel means the version never changes
- Assumes every snap publishes all four risk levels
- Says latest/stable will never cross a major version
- Confuses the Rev column with the tracked channel