Snap

ID

snap

Links

Home page · Documentation · Repository · Wikipedia

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

📦 manager: snap

Source

snap.py

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 snap

With mpm

List what’s installed

snap list

mpm --snap installed

List outdated packages

snap refresh --list

mpm --snap outdated

Search for a package

snap find doc

mpm --snap search doc

Install a package

sudo snap install standard-notes

mpm install pkg:snap/standard-notes

Upgrade one package

sudo snap refresh standard-notes

mpm --snap upgrade standard-notes

Upgrade everything

sudo snap refresh

mpm --snap upgrade --all

Remove a package

sudo snap remove standard-notes

mpm remove pkg:snap/standard-notes

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

installed

✅

outdated

✅

The refresh --list output reports only the available version, so each installed version is looked up separately.

orphans

search

✅

The snap find command matches summaries as well as names, so mpm refilters the results. Exact and extended search backfilled by mpm.

install

✅

upgrade

✅

upgrade_all

✅

remove

✅

sync

cleanup

doctor

Configuration

  • Ignore snap on the mpm CLI by passing the --no-snap option.

  • Ignore it for every run in your configuration:

    [mpm]
    snap = false
    
  • Raise the timeout of all snap calls:

    [mpm.overrides.snap]
    timeout = 900
    
  • Run mpm config-template snap to 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, then mpm restore snap.toml on the next one.

  • Export a compliance SBOM: mpm --snap sbom (CycloneDX by default, --spdx for 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, plus snap refresh --hold up to 90 days)

  • Mechanism: snap refresh --hold

  • Reference: 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

canonical/snapd

Activity

commit activity commits since open issues open pull requests

Popularity

forks watchers contributors

Metadata

latest release release date license main language

Changelog

  • 7.5.0 (2026-08-03)

    • Fix snap remove failing with error: unknown flag 'color' on recent snapd by no longer appending --color=never, which remove does not accept.

  • 7.4.0 (2026-07-25)

    • Mutating operations now escalate through sudo by default, matching each tool’s canonical invocation (sudo port install, sudo pkg install, sudo snap install): MacPorts installs root-owned under /opt/local, the FreeBSD pkg frontend gains the markers its ports sibling already had, and snapd denies state changes from an unprivileged client. Opt out with --no-sudo or a per-manager sudo = false override. pkg passes IGNORE_OSVERSION as a command-line option now, which survives the sudo environment reset where the environment variable would be stripped.

  • 6.4.0 (2026-04-27)

    • Add remove operation. 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 snap on Linux.