Snap¶
- ID
snap- Links
- Upstream stars
⭐ 2,054
- Last commit
2026-09-29
- Version requirement
>= 2
- Platforms
🅱️ BSD · 🐧 Linux · ⨂ Unix
- Operations
installed·outdated·search·install·upgrade·upgrade_all·remove- purl types
pkg:snap/- CLI name
snap- Every call
snap <command> --color=never- Issues and PRs
- Source
Canonical’s snap installs sandboxed, self-updating packages.
snaps refresh themselves on a schedule, so upgrade merely forces a
snap refresh sooner. Mutating operations escalate through sudo by
default: the privileged work happens in the snapd daemon, but the daemon
refuses state changes from an unprivileged client (snap install as a
plain user is denied with a hint to retry with sudo), which is why the
Snap store documents sudo snap install as the canonical invocation. A
host authenticated against the store with snap login (or granted a
polkit rule) can drop the wrap with --no-sudo or a
[mpm.overrides.snap] sudo = false override.
What mpm adds to snap¶
Through mpm, snap gains --exact and --extended search, to narrow to exact names or match descriptions.
Bigger still, mpm reaches across every manager at once: mpm installed and mpm outdated cover snap alongside every other manager you run in one table, mpm upgrade --all updates them together, and mpm sbom exports the whole machine as one bill of materials.
Every mpm command also gains --dry-run and --plan previews, cross-scheme version comparison and purl identifiers. See manager augmentations for how each one is built.
Your snap commands, in mpm¶
You already know snap: each operation maps one-to-one onto mpm, in an interface shared by every manager.
To… |
With |
With |
|---|---|---|
List what’s installed |
|
|
List outdated packages |
|
|
Search for a package |
|
|
Install a package |
|
|
Upgrade one package |
|
|
Upgrade everything |
|
|
Remove a package |
|
|
Prefix any command above with --dry-run to simulate the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.
Operations¶
Operation |
Supported |
Notes |
|---|---|---|
|
✅ |
|
|
✅ |
The |
|
||
|
✅ |
The |
|
✅ |
|
|
✅ |
|
|
✅ |
|
|
✅ |
|
|
||
|
||
|
Configuration¶
Ignore
snapon thempmCLI by passing the--no-snapoption.Ignore it for every run in your configuration:
[mpm] snap = false
Raise the timeout of all
snapcalls:[mpm.overrides.snap] timeout = 900
Run
mpm config-template snapto print all overridable settings for your configuration file:[mpm.overrides.snap] cli_names = [ "snap", ] cli_search_path = [] dry_run = false ignore_auto_updates = true plan = false post_args = [ "--color=never", ] pre_args = [] pre_cmds = [] requirement = ">=2.0.0" stop_on_error = false unmaintained = false version_cli_options = [ "--version", ] version_regexes = [ "snap\\s+(?P<version>\\S+)", ]
The arguments and environment variables listed in the box atop this page are forced on every snap call, so runs stay quiet, non-interactive and reproducible: the defaults you would set in CI anyway.
Recipes¶
A few jobs you would otherwise script around snap, one mpm command each:
Snapshot and clone a machine:
mpm --snap dump snap.toml, thenmpm restore snap.tomlon the next one.Export a compliance SBOM:
mpm --snap sbom(CycloneDX by default,--spdxfor SPDX).
Privilege escalation¶
System-wide manager: mpm wraps its privileged operations in sudo out of the box. Instead of letting the tool prompt mid-run, mpm primes the credential cache up-front, with a single branded password prompt at most. Turn escalation off for rootless setups with --no-sudo or the per-manager sudo override.
Its privileged operations are install, remove, upgrade, upgrade_all.
See privilege escalation for the full policy.
Cooldown¶
State of Snap’s release-age gating, from the cooldown support table:
Status: ➖ N/A (risk channels
stable/candidate/beta/edge, plussnap refresh --holdup to 90 days)Mechanism:
snap refresh --holdReference: Snap docs
A cooldown only pays off where a compromised release can be withdrawn while the clock runs, and can only be emulated where the registry dates its releases. From the retraction table:
Registry: Snap Store
Retraction: Index revert on the channel pointer: “Promoting and demoting revisions is also a useful progression […] for when a snap needs to revert to an older version as a response to a security concern” (release management)
With --cooldown set, mpm skips this manager’s install and upgrade operations rather than run them unguarded (fail-closed); --cooldown best-effort opts back in.
Reference traces¶
A collection of raw native outputs captured from the manager’s own CLI and recorded in the manager source. If you know Snap well and a transcript below looks wrong, or a newer release changed its output format, report it.
$ snap list --color=never
Name Version Rev Aufzeichnung Herausgeber Hinweise
core 16-2.44.1 8935 latest/stable canonical✓ core
wechat 2.0 7 latest/stable ubuntu-dawndiy -
pdftk 2.02-4 9 latest/stable smoser -
$ snap refresh --list --color=never
Name Version Rev Herausgeber Hinweise
standard-notes 3.3.5 8 standardnotes✓ -
Version check¶
The version is probed by running:
$ snap --version
snap 2.44.1
snapd 2.44.1
series 16
linuxmint 19.3
kernel 4.15.0-91-generic
and extracted with:
r"snap\s+(?P<version>\S+)"
Upstream project¶
Metrics |
|
|---|---|
Activity |
|
Popularity |
|
Metadata |
|
Changelog¶
7.5.0(2026-08-03)Fix
snap removefailing witherror: unknown flag 'color'on recent snapd by no longer appending--color=never, whichremovedoes not accept.
7.4.0(2026-07-25)Mutating operations now escalate through
sudoby default, matching each tool’s canonical invocation (sudo port install,sudo pkg install,sudo snap install): MacPorts installs root-owned under/opt/local, the FreeBSDpkgfrontend gains the markers itsportssibling already had, and snapd denies state changes from an unprivileged client. Opt out with--no-sudoor a per-managersudo = falseoverride.pkgpassesIGNORE_OSVERSIONas a command-line option now, which survives thesudoenvironment reset where the environment variable would be stripped.
6.4.0(2026-04-27)Add
removeoperation. Closes #1775.
5.5.0(2022-07-08)Fix parsing of empty search results.
4.13.1(2022-04-17)Fix command argument order. Address #579.
3.2.0(2020-05-31)Add support for
snapon Linux.