Snap¶
Canonical’s snap installs sandboxed, self-updating packages.
snaps refresh themselves on a schedule, so upgrade merely forces a
snap refresh sooner. No operation is marked sudo: the snapd
daemon performs the privileged work.
Note
snap localizes and colorizes its table headers with no terminal
detection. mpm pins nothing to English: --color=never strips the
ANSI, the header row is dropped, and every row is split on whitespace
and read by column position, so the translated headers never reach the
parser.
Note
snap refresh --list reports only the available version, so
outdated looks each installed version up by ID from the cached
installed set. search runs snap find, which matches summaries as
well as names, so mpm refilters the results.
Home page: https://snapcraft.io
Version requirement:
>=2.0.0
Platforms¶
🅱️ BSD
🐧 Linux
⨂ Unix
Operations¶
Operation |
Supported |
Notes |
|---|---|---|
|
✓ |
|
|
✓ |
|
|
✓ |
exact and extended search backfilled by |
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
||
|
Ecosystem¶
Accepted purl types:
pkg:snap
Usage¶
$ mpm --snap installed
$ mpm --snap search "query"
$ mpm --snap upgrade --all
$ mpm install pkg:snap/hello
$ mpm --dry-run --snap upgrade --all
Every example above accepts --dry-run, which simulates the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.
Deselect the manager for a single run with --no-snap, disable it from your configuration, or tune its invocation attributes with per-manager overrides.
Command line¶
CLI names, in lookup order:
snapArguments forced after each call:
--color=never
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+)"
Privilege escalation¶
mpm runs this manager as the current user and never prepends sudo by default. Flip the policy for its privileged operations with --sudo or the per-manager sudo override.
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
With --cooldown set, mpm skips this manager’s install and upgrade operations rather than run them unguarded (fail-closed); --allow-unsupported-managers opts back in.
Reference traces¶
Raw native outputs captured in the manager source: the reference mpm’s parsers were written against. 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✓ -