---
name: "snap"
section: "1"
platform: "linux"
package: "snapd"
version: "2.21-2+b1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/snap"
---

# snap(1)

Tool to interact with snaps

## NAME

snap - Tool to interact with snaps

## SYNOPSIS

**snap** \[OPTIONS\]

## DESCRIPTION

Install, configure, refresh and remove snap packages. Snaps are enabling secure distribution of the latest apps and utilities for cloud, servers, desktops and the internet of things.

This is the CLI for snapd, a background service that takes care of snaps on the system. Start with 'snap list' to see installed snaps.

## OPTIONS

### Application Options

- **--version**

  **Print the version and exit**

### Help Options

- **-h**, **--help**

  **Show this help message**

## COMMANDS

### abort

**Abort a pending change**

**The** *abort* **command attempts to abort a change that still has pending tasks.**

### Help Options

- **-h**, **--help**

  **Show this help message**

### ack

**Adds an assertion to the system**

**The** *ack* **command tries to add an assertion to the system assertion database.**

**The assertion may also be a newer revision of a preexisting assertion that it** **will replace.**

**To succeed the assertion must be valid, its signature verified with a known** **public key and the assertion consistent with and its prerequisite in the** **database.**

### Help Options

- **-h**, **--help**

  **Show this help message**

### alias

**Enables the given aliases**

**The** *alias* **command enables the given application aliases defined by the snap.**

**Once enabled the respective application commands can be invoked just using the aliases.**

**Usage: snap \[OPTIONS\] alias \[alias-OPTIONS\]**

- **The alias command enables the given application aliases defined by the snap.**

  ### Enables the given aliases

**Once enabled the respective application commands can be invoked just using the aliases.**

- **--reset**

  **Reset the aliases to their default state, enabled for automatic aliases, disabled otherwise**

### Help Options

- **-h**, **--help**

  **Show this help message**

### aliases

**Lists aliases in the system**

**The** *aliases* **command lists all aliases available in the system and their status.**

**$ snap aliases \<snap\>**

**Lists only the aliases defined by the specified snap.**

**An alias noted as undefined means it was explicitly enabled or disabled but is** **not defined in the current revision of the snap; possibly temporarely (e.g** **because of a revert), if not this can be cleared with snap alias --reset.**

### Help Options

- **-h**, **--help**

  **Show this help message**

### buy

**Buys a snap**

**The** *buy* **command buys a snap from the store.**

### Help Options

- **-h**, **--help**

  **Show this help message**

### change

**List a change's tasks**

**The** *change* **command displays a summary of tasks associated to an individual change.**

### Help Options

- **-h**, **--help**

  **Show this help message**

### changes

**List system changes**

**The** *changes* **command displays a summary of the recent system changes performed.**

### Help Options

- **-h**, **--help**

  **Show this help message**

### connect

**Connects a plug to a slot**

**The** *connect* **command connects a plug to a slot.** **It may be called in the following ways:**

**$ snap connect \<snap\>:\<plug\> \<snap\>:\<slot\>**

**Connects the provided plug to the given slot.**

**$ snap connect \<snap\>:\<plug\> \<snap\>**

**Connects the specific plug to the only slot in the provided snap that matches** **the connected interface. If more than one potential slot exists, the command** **fails.**

**$ snap connect \<snap\>:\<plug\>**

**Connects the provided plug to the slot in the core snap with a name matching** **the plug name.**

### Help Options

- **-h**, **--help**

  **Show this help message**

### disable

**Disables a snap in the system**

**The** *disable* **command disables a snap. The binaries and services of the** **snap will no longer be available. But all the data is still available** **and the snap can easily be enabled again.**

### Help Options

- **-h**, **--help**

  **Show this help message**

### disconnect

**Disconnects a plug from a slot**

**The** *disconnect* **command disconnects a plug from a slot.** **It may be called in the following ways:**

**$ snap disconnect \<snap\>:\<plug\> \<snap\>:\<slot\>**

**Disconnects the specific plug from the specific slot.**

**$ snap disconnect \<snap\>:\<slot or plug\>**

**Disconnects everything from the provided plug or slot.** **The snap name may be omitted for the core snap.**

### Help Options

- **-h**, **--help**

  **Show this help message**

### download

**Downloads the given snap**

**The** *download* **command downloads the given snap and its supporting assertions** **to the current directory under .snap and .assert file extensions, respectively.**

**Usage: snap \[OPTIONS\] download \[download-OPTIONS\]**

- **The download command downloads the given snap and its supporting assertions**

  ### Downloads the given snap

**to the current directory under .snap and .assert file extensions, respectively.**

- **--channel**

  **Use this channel instead of stable**

- **--edge**

  **Install from the edge channel**

- **--beta**

  **Install from the beta channel**

- **--candidate**

  **Install from the candidate channel**

- **--stable**

  **Install from the stable channel**

- **--revision**

  **Download the given revision of a snap, to which you must have developer access**

### Help Options

- **-h**, **--help**

  **Show this help message**

### enable

**Enables a snap in the system**

**The** *enable* **command enables a snap that was previously disabled.**

### Help Options

- **-h**, **--help**

  **Show this help message**

### find

**Finds packages to install**

**The** *find* **command queries the store for available packages.**

**Usage: snap \[OPTIONS\] find \[find-OPTIONS\]**

- **The find command queries the store for available packages.**

  ### Finds packages to install

- **--private**

  **Search private snaps**

- **--section**

  **Restrict the search to a given section**

### Help Options

- **-h**, **--help**

  **Show this help message**

### get

**Prints configuration options**

**The** *get* **command prints configuration options for the provided snap.**

    **$ snap get snap-name username**\
     **frank**

**If multiple option names are provided, a document is returned:**

    **$ snap get snap-name username password**\
     **{**\
         **"username": "frank",**\
         **"password": "..."**\
     **}**

**Nested values may be retrieved via a dotted path:**

    **$ snap get snap-name author.name**\
     **frank**

**Usage: snap \[OPTIONS\] get \[get-OPTIONS\]**

- **The get command prints configuration options for the provided snap.**

  ### Prints configuration options

    **$ snap get snap-name username**\
     **frank**

**If multiple option names are provided, a document is returned:**

    **$ snap get snap-name username password**\
     **{**\
         **"username": "frank",**\
         **"password": "..."**\
     **}**

**Nested values may be retrieved via a dotted path:**

    **$ snap get snap-name author.name**\
     **frank**

- **-t**

  **Strict typing with nulls and quoted strings**

- **-d**

  **Always return document, even with single key**

### Help Options

- **-h**, **--help**

  **Show this help message**

### help

**Help**

**The** *help* **command shows helpful information. Unlike this. ;-)**

**Usage: snap \[OPTIONS\] help \[help-OPTIONS\]**

- **The help command shows helpful information. Unlike this. ;-)**

  ### Help

- **--man**

  **Generate the manpage**

### Help Options

- **-h**, **--help**

  **Show this help message**

### info

**show detailed information about a snap**

**The** *info* **command shows detailed information about a snap, be it by name or by path.**

**Usage: snap \[OPTIONS\] info \[info-OPTIONS\]**

- **The info command shows detailed information about a snap, be it by name or by path.**

  ### show detailed information about a snap

- **--verbose**

  **Include a verbose list of a snap's notes (otherwise, summarise notes)**

### Help Options

- **-h**, **--help**

  **Show this help message**

### install

**Installs a snap to the system**

**The** *install* **command installs the named snap in the system.**

**Usage: snap \[OPTIONS\] install \[install-OPTIONS\]**

- **The install command installs the named snap in the system.**

  ### Installs a snap to the system

- **--channel**

  **Use this channel instead of stable**

- **--edge**

  **Install from the edge channel**

- **--beta**

  **Install from the beta channel**

- **--candidate**

  **Install from the candidate channel**

- **--stable**

  **Install from the stable channel**

- **--devmode**

  **Put snap in development mode and disable security confinement**

- **--jailmode**

  **Put snap in enforced confinement mode**

- **--classic**

  **Put snap in classic mode and disable security confinement**

- **--revision**

  **Install the given revision of a snap, to which you must have developer access**

- **--dangerous**

  **Install the given snap file even if there are no pre-acknowledged signatures for it, meaning it was not verified and could be dangerous (--devmode implies this)**

### Help Options

- **-h**, **--help**

  **Show this help message**

### interfaces

**Lists interfaces in the system**

**The** *interfaces* **command lists interfaces available in the system.**

**By default all slots and plugs, used and offered by all snaps, are displayed.**

**$ snap interfaces \<snap\>:\<slot or plug\>**

**Lists only the specified slot or plug.**

**$ snap interfaces \<snap\>**

**Lists the slots offered and plugs used by the specified snap.**

**$ snap interfaces -i=\<interface\> \[\<snap\>\]**

**Filters the complete output so only plugs and/or slots matching the provided details are listed.**

**Usage: snap \[OPTIONS\] interfaces \[interfaces-OPTIONS\]**

- **The interfaces command lists interfaces available in the system.**

  ### Lists interfaces in the system

**By default all slots and plugs, used and offered by all snaps, are displayed.**

**$ snap interfaces \<snap\>:\<slot or plug\>**

**Lists only the specified slot or plug.**

**$ snap interfaces \<snap\>**

**Lists the slots offered and plugs used by the specified snap.**

**$ snap interfaces -i=\<interface\> \[\<snap\>\]**

**Filters the complete output so only plugs and/or slots matching the provided details are listed.**

- **-i**

  **Constrain listing to specific interfaces**

### Help Options

- **-h**, **--help**

  **Show this help message**

### known

**Shows known assertions of the provided type**

**The** *known* **command shows known assertions of the provided type.** **If header=value pairs are provided after the assertion type, the assertions** **shown must also have the specified headers matching the provided values.**

**Usage: snap \[OPTIONS\] known \[known-OPTIONS\]**

- **The known command shows known assertions of the provided type.**

  ### Shows known assertions of the provided type

**If header=value pairs are provided after the assertion type, the assertions** **shown must also have the specified headers matching the provided values.**

- **--remote**

  ### Help Options

- **-h**, **--help**

  **Show this help message**

### list

**List installed snaps**

**The** *list* **command displays a summary of snaps installed in the current system.**

**Usage: snap \[OPTIONS\] list \[list-OPTIONS\]**

- **The list command displays a summary of snaps installed in the current system.**

  ### List installed snaps

- **--all**

  **Show all revisions**

### Help Options

- **-h**, **--help**

  **Show this help message**

### login

**Authenticates on snapd and the store**

**The** *login* **command authenticates on snapd and the snap store and saves credentials** **into the ~/.snap/auth.json file. Further communication with snapd will then be made** **using those credentials.**

**Login only works for local users in the sudo, admin or wheel groups.**

**An account can be setup at https://login.ubuntu.com**

### Help Options

- **-h**, **--help**

  **Show this help message**

### logout

**Log out of the store**

**This command logs the current user out of the store**

### Help Options

- **-h**, **--help**

  **Show this help message**

### refresh

**Refreshes a snap in the system**

**The** *refresh* **command refreshes (updates) the named snap.**

**Usage: snap \[OPTIONS\] refresh \[refresh-OPTIONS\]**

- **The refresh command refreshes (updates) the named snap.**

  ### Refreshes a snap in the system

- **--channel**

  **Use this channel instead of stable**

- **--edge**

  **Install from the edge channel**

- **--beta**

  **Install from the beta channel**

- **--candidate**

  **Install from the candidate channel**

- **--stable**

  **Install from the stable channel**

- **--devmode**

  **Put snap in development mode and disable security confinement**

- **--jailmode**

  **Put snap in enforced confinement mode**

- **--classic**

  **Put snap in classic mode and disable security confinement**

- **--revision**

  **Refresh to the given revision**

- **--list**

  **Show available snaps for refresh**

- **--ignore-validation**

  **Ignore validation by other snaps blocking the refresh**

### Help Options

- **-h**, **--help**

  **Show this help message**

### remove

**Removes a snap from the system**

**The** *remove* **command removes the named snap from the system.**

**By default all the snap revisions are removed, including their data and the common** **data directory. When a --revision option is passed only the specified revision is** **removed.**

**Usage: snap \[OPTIONS\] remove \[remove-OPTIONS\]**

- **The remove command removes the named snap from the system.**

  ### Removes a snap from the system

**By default all the snap revisions are removed, including their data and the common** **data directory. When a --revision option is passed only the specified revision is** **removed.**

- **--revision**

  **Remove only the given revision**

### Help Options

- **-h**, **--help**

  **Show this help message**

### revert

**Reverts the given snap to the previous state**

**The** *revert* **command reverts the given snap to its state before** **the latest refresh. This will reactivate the previous snap revision,** **and will use the original data that was associated with that revision,** **discarding any data changes that were done by the latest revision. As** **an exception, data which the snap explicitly chooses to share across** **revisions is not touched by the revert process.**

**Usage: snap \[OPTIONS\] revert \[revert-OPTIONS\]**

- **The revert command reverts the given snap to its state before**

  ### Reverts the given snap to the previous state

**the latest refresh. This will reactivate the previous snap revision,** **and will use the original data that was associated with that revision,** **discarding any data changes that were done by the latest revision. As** **an exception, data which the snap explicitly chooses to share across** **revisions is not touched by the revert process.**

- **--devmode**

  **Put snap in development mode and disable security confinement**

- **--jailmode**

  **Put snap in enforced confinement mode**

- **--classic**

  **Put snap in classic mode and disable security confinement**

- **--revision**

  **Revert to the given revision**

### Help Options

- **-h**, **--help**

  **Show this help message**

### run

**Run the given snap command**

**Run the given snap command with the right confinement and environment**

**Usage: snap \[OPTIONS\] run \[run-OPTIONS\]**

- **Run the given snap command with the right confinement and environment**

  ### Run the given snap command

- **--shell**

  **Run a shell instead of the command (useful for debugging)**

### Help Options

- **-h**, **--help**

  **Show this help message**

### set

**Changes configuration options**

**The** *set* **command changes the provided configuration options as requested.**

    **$ snap set snap-name username=frank password=$PASSWORD**

**All configuration changes are persisted at once, and only after the** **snap's configuration hook returns successfully.**

**Nested values may be modified via a dotted path:**

    **$ snap set author.name=frank**

### Help Options

- **-h**, **--help**

  **Show this help message**

### try

**Tests a snap in the system**

**The** *try* **command installs an unpacked snap into the system for testing purposes.** **The unpacked snap content continues to be used even after installation, so** **non-metadata changes there go live instantly. Metadata changes such as those** **performed in snap.yaml will require reinstallation to go live.**

**If snap-dir argument is omitted, the try command will attempt to infer it if** **either snapcraft.yaml file and prime directory or meta/snap.yaml file can be** **found relative to current working directory.**

**Usage: snap \[OPTIONS\] try \[try-OPTIONS\]**

- **The try command installs an unpacked snap into the system for testing purposes.**

  ### Tests a snap in the system

**The unpacked snap content continues to be used even after installation, so** **non-metadata changes there go live instantly. Metadata changes such as those** **performed in snap.yaml will require reinstallation to go live.**

**If snap-dir argument is omitted, the try command will attempt to infer it if** **either snapcraft.yaml file and prime directory or meta/snap.yaml file can be** **found relative to current working directory.**

- **--devmode**

  **Put snap in development mode and disable security confinement**

- **--jailmode**

  **Put snap in enforced confinement mode**

- **--classic**

  **Put snap in classic mode and disable security confinement**

### Help Options

- **-h**, **--help**

  **Show this help message**

### unalias

**Disables the given aliases**

**The** *unalias* **command disables explicitly the given application aliases defined by the snap.**

### Help Options

- **-h**, **--help**

  **Show this help message**

### version

**Help**

**The help command shows helpful information. Unlike this. ;-)**

### Help Options

- **-h**, **--help**

  **Show this help message**

### watch

**Watch a change in progress**

**The** *watch* **command waits for the given change-id to finish and shows progress** **(if available).**

### Help Options

- **-h**, **--help**

  **Show this help message**
