.TH snap 8 "18 May 2023" .SH NAME snap \- Tool to interact with snaps .SH SYNOPSIS \fBsnap\fP [OPTIONS] .SH DESCRIPTION The snap command lets you install, configure, refresh and remove snaps. Snaps are packages that work across many different Linux distributions, enabling secure delivery and operation of the latest apps and utilities. .SH OPTIONS .SS Application Options .SH COMMANDS .SS abort Abort a pending change The \fIabort\fP command attempts to abort a change that still has pending tasks. \fBUsage\fP: snap [OPTIONS] abort [abort-OPTIONS] .TP \fB\fB\-\-last\fR\fP Select last change of given type (install, refresh, remove, try, auto-refresh, etc.). A question mark at the end of the type means to do nothing (instead of returning an error) if no change of the given type is found. Note the question mark could need protecting from the shell. .SS ack Add an assertion to the system The \fIack\fP command tries to add an assertion to the system assertion database. The assertion may also be a newer revision of a pre-existing 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. .SS alias Set up a manual alias The \fIalias\fP command aliases the given snap application to the given alias. Once this manual alias is setup the respective application command can be invoked just using the alias. \fBUsage\fP: snap [OPTIONS] alias [alias-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .SS aliases List aliases in the system The \fIaliases\fP command lists all aliases available in the system and their status. $ snap aliases 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 temporarily (e.g. because of a revert). This can cleared with 'snap alias --reset'. .SS changes List system changes The \fIchanges\fP command displays a summary of system changes performed recently. \fBUsage\fP: snap [OPTIONS] changes [changes-OPTIONS] .TP \fB\fB\-\-abs-time\fR\fP Display absolute times (in RFC 3339 format). Otherwise, display relative times up to 60 days, then YYYY-MM-DD. .SS check-snapshot Check a snapshot The \fIcheck-snapshot\fP command verifies the user, system and configuration data of the snaps included in the specified snapshot. The check operation runs the same data integrity verification that is performed when a snapshot is restored. By default, this command checks all the data in a snapshot. Alternatively, you can specify the data of which snaps to check, or for which users, or a combination of these. If a snap is included in a check-snapshot operation, excluding its system and configuration data from the check is not currently possible. This restriction may be lifted in the future. \fBUsage\fP: snap [OPTIONS] check-snapshot [check-snapshot-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .TP \fB\fB\-\-users\fR\fP Check data of only specific users (comma-separated) (default: all users) .SS connect Connect a plug to a slot The \fIconnect\fP command connects a plug to a slot. It may be called in the following ways: $ snap connect : : Connects the provided plug to the given slot. $ snap connect : 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 : Connects the provided plug to the slot in the core snap with a name matching the plug name. \fBUsage\fP: snap [OPTIONS] connect [connect-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .SS connections List interface connections The \fIconnections\fP command lists connections between plugs and slots in the system. Unless is provided, the listing is for connected plugs and slots for all snaps in the system. In this mode, pass --all to also list unconnected plugs and slots. $ snap connections Lists connected and unconnected plugs and slots for the specified snap. \fBUsage\fP: snap [OPTIONS] connections [connections-OPTIONS] .TP \fB\fB\-\-all\fR\fP Show connected and unconnected plugs and slots .SS create-cohort Create cohort keys for a set of snaps The \fIcreate-cohort\fP command creates a set of cohort keys for a given set of snaps. A cohort is a view or snapshot of a snap's "channel map" at a given point in time that fixes the set of revisions for the snap given other constraints (e.g. channel or architecture). The cohort is then identified by an opaque per-snap key that works across systems. Installations or refreshes of the snap using a given cohort key would use a fixed revision for up to 90 days, after which a new set of revisions would be fixed under that same cohort key and a new 90 days window started. .SS debug Run debug commands The debug command contains a selection of additional sub-commands. Debug commands can be removed without notice and may not work on non-development systems. .SS debug confinement Print the confinement mode the system operates in The \fIconfinement\fP command will print the confinement mode (strict, partial or none) the system operates in. .SS debug connectivity Check network connectivity status The \fIconnectivity\fP command checks the network connectivity of snapd. .SS debug migrate-home Migrate snaps' directory to ~/Snap. Migrate snaps' directory to ~/Snap. \fBUsage\fP: debug migrate-home [migrate-home-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP .SS debug paths Print system paths The \fIpaths\fP command prints the list of paths detected and used by snapd. .SS debug sandbox-features Print sandbox features available on the system The sandbox command prints tags describing features of individual sandbox components used by snapd on a given system. \fBUsage\fP: debug sandbox-features [sandbox-features-OPTIONS] .TP \fB\fB\-\-required\fR\fP Ensure that given backend:feature is available .SS debug stacktraces Obtain stacktraces of all snapd goroutines Obtain stacktraces of all snapd goroutines. .SS debug state Inspect a snapd state file. Inspect a snapd state file, bypassing snapd API. \fBUsage\fP: debug state [state-OPTIONS] .TP \fB\fB\-\-abs-time\fR\fP Display absolute times (in RFC 3339 format). Otherwise, display relative times up to 60 days, then YYYY-MM-DD. .TP \fB\fB\-\-changes\fR\fP List all changes .TP \fB\fB\-\-task\fR\fP ID of the task to inspect .TP \fB\fB\-\-change\fR\fP ID of the change to inspect .TP \fB\fB\-\-check\fR\fP Check change consistency .TP \fB\fB\-\-connections\fR\fP List all connections .TP \fB\fB\-\-connection\fR\fP Show details of the matching connections (snap or snap:plug,snap:slot or snap:plug-or-slot .TP \fB\fB\-\-is-seeded\fR\fP Output seeding status (true or false) .TP \fB\fB\-\-dot\fR\fP Dot (graphviz) output .TP \fB\fB\-\-no-hold\fR\fP Omit tasks in 'Hold' state in the change output .SS debug timings Get the timings of the tasks of a change The \fItimings\fP command displays details about the time each task runs. \fBUsage\fP: debug timings [timings-OPTIONS] .TP \fB\fB\-\-last\fR\fP Select last change of given type (install, refresh, remove, try, auto-refresh, etc.). A question mark at the end of the type means to do nothing (instead of returning an error) if no change of the given type is found. Note the question mark could need protecting from the shell. .TP \fB\fB\-\-ensure\fR\fP Show timings for a change related to the given Ensure activity (one of: auto-refresh, become-operational, refresh-catalogs, refresh-hints, seed) .TP \fB\fB\-\-all\fR\fP Show timings for all executions of the given Ensure or startup activity, not just the latest .TP \fB\fB\-\-startup\fR\fP Show timings for the startup of given subsystem (one of: load-state, ifacemgr) .TP \fB\fB\-\-verbose\fR\fP Show more information .SS disable Disable a snap in the system The \fIdisable\fP 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. \fBUsage\fP: snap [OPTIONS] disable [disable-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .SS disconnect Disconnect a plug from a slot The \fIdisconnect\fP command disconnects a plug from a slot. It may be called in the following ways: $ snap disconnect : : Disconnects the specific plug from the specific slot. $ snap disconnect : Disconnects everything from the provided plug or slot. The snap name may be omitted for the core snap. When an automatic connection is manually disconnected, its disconnected state is retained after a snap refresh. The --forget flag can be added to the disconnect command to reset this behaviour, and consequently re-enable an automatic reconnection after a snap refresh. \fBUsage\fP: snap [OPTIONS] disconnect [disconnect-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .TP \fB\fB\-\-forget\fR\fP Forget remembered state about the given connection. .SS download Download the given snap The \fIdownload\fP command downloads the given snap and its supporting assertions to the current directory with .snap and .assert file extensions, respectively. \fBUsage\fP: snap [OPTIONS] download [download-OPTIONS] .TP \fB\fB\-\-channel\fR\fP Use this channel instead of stable .TP \fB\fB\-\-edge\fR\fP Install from the edge channel .TP \fB\fB\-\-beta\fR\fP Install from the beta channel .TP \fB\fB\-\-candidate\fR\fP Install from the candidate channel .TP \fB\fB\-\-stable\fR\fP Install from the stable channel .TP \fB\fB\-\-revision\fR\fP Download the given revision of a snap, to which you must have developer access .TP \fB\fB\-\-basename\fR\fP Use this basename for the snap and assertion files (defaults to _) .TP \fB\fB\-\-target-directory\fR\fP Download to this directory (defaults to the current directory) .TP \fB\fB\-\-cohort\fR\fP Download from the given cohort .SS enable Enable a snap in the system The \fIenable\fP command enables a snap that was previously disabled. \fBUsage\fP: snap [OPTIONS] enable [enable-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .SS export-snapshot Export a snapshot Export a snapshot to the given filename. .SS find Find packages to install The \fIfind\fP command queries the store for available packages. With the --private flag, which requires the user to be logged-in to the store (see 'snap help login'), it instead searches for private snaps that the user has developer access to, either directly or through the store's collaboration feature. A green check mark (given color and unicode support) after a publisher name indicates that the publisher has been verified. \fBUsage\fP: snap [OPTIONS] find [find-OPTIONS] .TP \fBAliases\fP: search .TP \fB\fB\-\-private\fR\fP Search private snaps. .TP \fB\fB\-\-narrow\fR\fP Only search for snaps in “stable”. .TP \fB\fB\-\-section\fR [\fI="show-all-sections-please"\fR] \fP Restrict the search to a given section. .TP \fB\fB\-\-color\fR \fP Use a little bit of color to highlight some things. .TP \fB\fB\-\-unicode\fR \fP Use a little bit of Unicode to improve legibility. .SS forget Delete a snapshot The \fIforget\fP command deletes a snapshot. This operation can not be undone. A snapshot contains archives for the user, system and configuration data of each snap included in the snapshot. By default, this command forgets all the data in a snapshot. Alternatively, you can specify the data of which snaps to forget. \fBUsage\fP: snap [OPTIONS] forget [forget-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .SS get Print configuration options The \fIget\fP command prints configuration options for the provided snap. $ snap get snap-name username frank If multiple option names are provided, the corresponding values are returned: $ snap get snap-name username password Key Value username frank password ... Nested values may be retrieved via a dotted path: $ snap get snap-name author.name frank \fBUsage\fP: snap [OPTIONS] get [get-OPTIONS] .TP \fB\fB\-t\fR\fP Strict typing with nulls and quoted strings .TP \fB\fB\-d\fR\fP Always return document, even with single key .TP \fB\fB\-l\fR\fP Always return list, even with single key .SS help Show help about a command The \fIhelp\fP command displays information about snap commands. \fBUsage\fP: snap [OPTIONS] help [help-OPTIONS] .TP \fB\fB\-\-all\fR\fP Show a short summary of all commands .SS import-snapshot Import a snapshot Import an exported snapshot set to the system. The snapshot is imported with a new snapshot ID and can be restored using the restore command. \fBUsage\fP: snap [OPTIONS] import-snapshot [import-snapshot-OPTIONS] .TP \fB\fB\-\-abs-time\fR\fP .SS info Show detailed information about snaps The \fIinfo\fP command shows detailed information about snaps. The snaps can be specified by name or by path; names are looked for both in the store and in the installed snaps; paths can refer to a .snap file, or to a directory that contains an unpacked snap suitable for 'snap try' (an example of this would be the 'prime' directory snapcraft produces). \fBUsage\fP: snap [OPTIONS] info [info-OPTIONS] .TP \fB\fB\-\-color\fR \fP Use a little bit of color to highlight some things. .TP \fB\fB\-\-unicode\fR \fP Use a little bit of Unicode to improve legibility. .TP \fB\fB\-\-abs-time\fR\fP Display absolute times (in RFC 3339 format). Otherwise, display relative times up to 60 days, then YYYY-MM-DD. .TP \fB\fB\-\-verbose\fR\fP Include more details on the snap (expanded notes, base, etc.) .SS install Install snaps on the system The \fIinstall\fP command installs the named snaps on the system. To install multiple instances of the same snap, append an underscore and a unique identifier (for each instance) to a snap's name. With no further options, the snaps are installed tracking the stable channel, with strict security confinement. All available channels of a snap are listed in its 'snap info' output. Revision choice via the --revision override requires the user to have developer access to the snap, either directly or through the store's collaboration feature, and to be logged in (see 'snap help login'). Note that a later refresh will typically undo a revision override, taking the snap back to the current revision of the channel it's tracking. Use --name to set the instance name when installing from snap file. \fBUsage\fP: snap [OPTIONS] install [install-OPTIONS] .TP \fB\fB\-\-color\fR \fP Use a little bit of color to highlight some things. .TP \fB\fB\-\-unicode\fR \fP Use a little bit of Unicode to improve legibility. .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .TP \fB\fB\-\-channel\fR\fP Use this channel instead of stable .TP \fB\fB\-\-edge\fR\fP Install from the edge channel .TP \fB\fB\-\-beta\fR\fP Install from the beta channel .TP \fB\fB\-\-candidate\fR\fP Install from the candidate channel .TP \fB\fB\-\-stable\fR\fP Install from the stable channel .TP \fB\fB\-\-devmode\fR\fP Put snap in development mode and disable security confinement .TP \fB\fB\-\-jailmode\fR\fP Put snap in enforced confinement mode .TP \fB\fB\-\-classic\fR\fP Put snap in classic mode and disable security confinement .TP \fB\fB\-\-revision\fR\fP Install the given revision of a snap, to which you must have developer access .TP \fB\fB\-\-dangerous\fR\fP 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) .TP \fB\fB\-\-unaliased\fR\fP Install the given snap without enabling its automatic aliases .TP \fB\fB\-\-name\fR\fP Install the snap file under the given instance name .TP \fB\fB\-\-cohort\fR\fP Install the snap in the given cohort .TP \fB\fB\-\-ignore-validation\fR\fP Ignore validation by other snaps blocking the installation .TP \fB\fB\-\-transaction\fR \fP Have one transaction per-snap or one for all the specified snaps .SS interface Show details of snap interfaces The \fIinterface\fP command shows details of snap interfaces. If no interface name is provided, a list of interface names with at least one connection is shown, or a list of all interfaces if --all is provided. \fBUsage\fP: snap [OPTIONS] interface [interface-OPTIONS] .TP \fB\fB\-\-attrs\fR\fP Show interface attributes .TP \fB\fB\-\-all\fR\fP Include unused interfaces .SS known Show known assertions of the provided type The \fIknown\fP 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. \fBUsage\fP: snap [OPTIONS] known [known-OPTIONS] .TP \fB\fB\-\-remote\fR\fP Query the store for the assertion, via snapd if possible .TP \fB\fB\-\-direct\fR\fP Query the store for the assertion, without attempting to go via snapd .SS list List installed snaps The \fIlist\fP command displays a summary of snaps installed in the current system. A green check mark (given color and unicode support) after a publisher name indicates that the publisher has been verified. \fBUsage\fP: snap [OPTIONS] list [list-OPTIONS] .TP \fB\fB\-\-all\fR\fP Show all revisions .TP \fB\fB\-\-color\fR \fP Use a little bit of color to highlight some things. .TP \fB\fB\-\-unicode\fR \fP Use a little bit of Unicode to improve legibility. .SS login Authenticate to snapd and the store The \fIlogin\fP command authenticates the user to 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. It's not necessary to log in to interact with snapd. Doing so, however, enables interactions without sudo, as well as some some developer-oriented features as detailed in the help for the find, install and refresh commands. An account can be set up at https://login.ubuntu.com .SS logout Log out of snapd and the store The \fIlogout\fP command logs the current user out of snapd and the store. .SS logs Retrieve logs for services The \fIlogs\fP command fetches logs of the given services and displays them in chronological order. \fBUsage\fP: snap [OPTIONS] logs [logs-OPTIONS] .TP \fB\fB\-\-abs-time\fR\fP Display absolute times (in RFC 3339 format). Otherwise, display relative times up to 60 days, then YYYY-MM-DD. .TP \fB\fB\-n\fR \fP Show only the given number of lines, or 'all'. .TP \fB\fB\-f\fR\fP Wait for new lines and print them as they come in. .SS model Get the active model for this device The \fImodel\fP command returns the active model assertion information for this device. By default, only the essential model identification information is included in the output, but this can be expanded to include all of an assertion's non-meta headers. The verbose output is presented in a structured, yaml-like format. Similarly, the active serial assertion can be used for the output instead of the model assertion. \fBUsage\fP: snap [OPTIONS] model [model-OPTIONS] .TP \fB\fB\-\-abs-time\fR\fP Display absolute times (in RFC 3339 format). Otherwise, display relative times up to 60 days, then YYYY-MM-DD. .TP \fB\fB\-\-color\fR \fP Use a little bit of color to highlight some things. .TP \fB\fB\-\-unicode\fR \fP Use a little bit of Unicode to improve legibility. .TP \fB\fB\-\-serial\fR\fP Print the serial assertion instead of the model assertion. .TP \fB\fB\-\-verbose\fR\fP Print all specific assertion fields. .TP \fB\fB\-\-assertion\fR\fP Print the raw assertion. .SS okay Acknowledge warnings The \fIokay\fP command acknowledges the warnings listed with 'snap warnings'. Once acknowledged a warning won't appear again unless it re-occurrs and sufficient time has passed. .SS pack Pack the given directory as a snap The \fIpack\fP command packs the given snap-dir as a snap and writes the result to target-dir. If target-dir is omitted, the result is written to current directory. If both source-dir and target-dir are omitted, the pack command packs the current directory. The default file name for a snap can be derived entirely from its snap.yaml, but in some situations it's simpler for a script to feed the filename in. In those cases, --filename can be given to override the default. If this filename is not absolute it will be taken as relative to target-dir. When used with --check-skeleton, pack only checks whether snap-dir contains valid snap metadata and raises an error otherwise. Application commands listed in snap metadata file, but appearing with incorrect permission bits result in an error. Commands that are missing from snap-dir are listed in diagnostic messages. \fBUsage\fP: snap [OPTIONS] pack [pack-OPTIONS] .TP \fB\fB\-\-check-skeleton\fR\fP Validate snap-dir metadata only .TP \fB\fB\-\-filename\fR\fP Output to this filename .TP \fB\fB\-\-compression\fR\fP Compression to use (e.g. xz or lzo) .SS prefer Enable aliases from a snap, disabling any conflicting aliases The \fIprefer\fP command enables all aliases of the given snap in preference to conflicting aliases of other snaps whose aliases will be disabled (or removed, for manual ones). \fBUsage\fP: snap [OPTIONS] prefer [prefer-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .SS prepare-image Prepare a device image The \fIprepare-image\fP command performs some of the steps necessary for creating device images. For core images it is not invoked directly but usually via ubuntu-image. For preparing classic images it supports a --classic mode \fBUsage\fP: snap [OPTIONS] prepare-image [prepare-image-OPTIONS] .TP \fB\fB\-\-classic\fR\fP Enable classic mode to prepare a classic model image .TP \fB\fB\-\-preseed\fR\fP Preseed (UC20+ only) .TP \fB\fB\-\-preseed-sign-key\fR\fP Name of the key to use to sign preseed assertion, otherwise use the default key .TP \fB\fB\-\-apparmor-features-dir\fR\fP Optional path to apparmor kernel features directory (UC20+ only) .TP \fB\fB\-\-arch\fR\fP Specify an architecture for snaps for --classic when the model does not .TP \fB\fB\-\-channel\fR\fP The channel to use .TP \fB\fB\-\-snap\fR \fI[=]\fR\fP Include the given snap from the store or a local file and/or specify the channel to track for the given snap .SS reboot Reboot into selected system and mode The \fIreboot\fP command reboots the system into a particular mode of the selected recovery system. When called without a system label and without a mode it will just trigger a regular reboot. When called without a system label but with a mode it will use the current system to enter the given mode. Note that "recover", "factory-reset" and "run" modes are only available for the current system. \fBUsage\fP: snap [OPTIONS] reboot [reboot-OPTIONS] .TP \fB\fB\-\-run\fR\fP Boot into run mode .TP \fB\fB\-\-install\fR\fP Boot into install mode .TP \fB\fB\-\-recover\fR\fP Boot into recover mode .TP \fB\fB\-\-factory-reset\fR\fP Boot into factory-reset mode .SS recovery List available recovery systems The \fIrecovery\fP command lists the available recovery systems. With --show-keys it displays recovery keys that can be used to unlock the encrypted partitions if the device-specific automatic unlocking does not work. \fBUsage\fP: snap [OPTIONS] recovery [recovery-OPTIONS] .TP \fB\fB\-\-color\fR \fP Use a little bit of color to highlight some things. .TP \fB\fB\-\-unicode\fR \fP Use a little bit of Unicode to improve legibility. .TP \fB\fB\-\-show-keys\fR\fP Show recovery keys (if available) to unlock encrypted partitions. .SS refresh Refresh snaps in the system The \fIrefresh\fP command updates the specified snaps, or all snaps in the system if none are specified. With no further options, the snaps are refreshed to the current revision of the channel they're tracking, preserving their confinement options. All available channels of a snap are listed in its 'snap info' output. Revision choice via the --revision override requires the user to have developer access to the snap, either directly or through the store's collaboration feature, and to be logged in (see 'snap help login'). Note a later refresh will typically undo a revision override. \fBUsage\fP: snap [OPTIONS] refresh [refresh-OPTIONS] .TP \fB\fB\-\-color\fR \fP Use a little bit of color to highlight some things. .TP \fB\fB\-\-unicode\fR \fP Use a little bit of Unicode to improve legibility. .TP \fB\fB\-\-abs-time\fR\fP Display absolute times (in RFC 3339 format). Otherwise, display relative times up to 60 days, then YYYY-MM-DD. .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .TP \fB\fB\-\-channel\fR\fP Use this channel instead of stable .TP \fB\fB\-\-edge\fR\fP Install from the edge channel .TP \fB\fB\-\-beta\fR\fP Install from the beta channel .TP \fB\fB\-\-candidate\fR\fP Install from the candidate channel .TP \fB\fB\-\-stable\fR\fP Install from the stable channel .TP \fB\fB\-\-devmode\fR\fP Put snap in development mode and disable security confinement .TP \fB\fB\-\-jailmode\fR\fP Put snap in enforced confinement mode .TP \fB\fB\-\-classic\fR\fP Put snap in classic mode and disable security confinement .TP \fB\fB\-\-amend\fR\fP Allow refresh attempt on snap unknown to the store .TP \fB\fB\-\-revision\fR\fP Refresh to the given revision, to which you must have developer access .TP \fB\fB\-\-cohort\fR\fP Refresh the snap into the given cohort .TP \fB\fB\-\-leave-cohort\fR\fP Refresh the snap out of its cohort .TP \fB\fB\-\-list\fR\fP Show the new versions of snaps that would be updated with the next refresh .TP \fB\fB\-\-time\fR\fP Show auto refresh information but do not perform a refresh .TP \fB\fB\-\-ignore-validation\fR\fP Ignore validation by other snaps blocking the refresh .TP \fB\fB\-\-transaction\fR \fP Have one transaction per-snap or one for all the specified snaps .SS remove Remove snaps from the system The \fIremove\fP command removes the named snap instance 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. Unless automatic snapshots are disabled, a snapshot of all data for the snap is saved upon removal, which is then available for future restoration with snap restore. The --purge option disables automatically creating snapshots. \fBUsage\fP: snap [OPTIONS] remove [remove-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .TP \fB\fB\-\-revision\fR\fP Remove only the given revision .TP \fB\fB\-\-purge\fR\fP Remove the snap without saving a snapshot of its data .SS restart Restart services The \fIrestart\fP command restarts the given services. If the --reload option is given, for each service whose app has a reload command, a reload is performed instead of a restart. \fBUsage\fP: snap [OPTIONS] restart [restart-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .TP \fB\fB\-\-reload\fR\fP If the service has a reload command, use it instead of restarting. .SS restore Restore a snapshot The \fIrestore\fP command replaces the current user, system and configuration data of included snaps, with the corresponding data from the specified snapshot. By default, this command restores all the data in a snapshot. Alternatively, you can specify the data of which snaps to restore, or for which users, or a combination of these. If a snap is included in a restore operation, excluding its system and configuration data from the restore is not currently possible. This restriction may be lifted in the future. \fBUsage\fP: snap [OPTIONS] restore [restore-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .TP \fB\fB\-\-users\fR\fP Restore data of only specific users (comma-separated) (default: all users) .SS revert Reverts the given snap to the previous state The \fIrevert\fP 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. \fBUsage\fP: snap [OPTIONS] revert [revert-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .TP \fB\fB\-\-devmode\fR\fP Put snap in development mode and disable security confinement .TP \fB\fB\-\-jailmode\fR\fP Put snap in enforced confinement mode .TP \fB\fB\-\-classic\fR\fP Put snap in classic mode and disable security confinement .TP \fB\fB\-\-revision\fR\fP Revert to the given revision .SS run Run the given snap command The \fIrun\fP command executes the given snap command with the right confinement and environment. \fBUsage\fP: snap [OPTIONS] run [run-OPTIONS] . [...] .TP \fB\fB\-\-shell\fR\fP Run a shell instead of the command (useful for debugging) .TP \fB\fB\-\-debug-log\fR\fP Enable debug logging during early snap startup phases .TP \fB\fB\-\-strace\fR [\fI="with-strace"\fR] \fP Run the command under strace (useful for debugging). Extra strace options can be specified as well here. Pass --raw to strace early snap helpers. .TP \fB\fB\-\-gdbserver\fR [\fI=":0"\fR] \fP Run the command with gdbserver .TP \fB\fB\-\-trace-exec\fR\fP Display exec calls timing data .SS save Save a snapshot of the current data The \fIsave\fP command creates a snapshot of the current user, system and configuration data for the given snaps. By default, this command saves the data of all snaps for all users. Alternatively, you can specify the data of which snaps to save, or for which users, or a combination of these. If a snap is included in a save operation, excluding its system and configuration data from the snapshot is not currently possible. This restriction may be lifted in the future. \fBUsage\fP: snap [OPTIONS] save [save-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .TP \fB\fB\-\-abs-time\fR\fP Display absolute times (in RFC 3339 format). Otherwise, display short relative times. .TP \fB\fB\-\-users\fR\fP Snapshot data of only specific users (comma-separated) (default: all users) .SS saved List currently stored snapshots The \fIsaved\fP command displays a list of snapshots that have been created previously with the 'save' command. \fBUsage\fP: snap [OPTIONS] saved [saved-OPTIONS] .TP \fB\fB\-\-abs-time\fR\fP Display absolute times (in RFC 3339 format). Otherwise, display short relative times. .TP \fB\fB\-\-id\fR\fP Show only a specific snapshot. .SS services Query the status of services The \fIservices\fP command lists information about the services specified, or about the services in all currently installed snaps. .SS set Change configuration options The \fIset\fP 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 snap-name author.name=frank Configuration option may be unset with exclamation mark: $ snap set snap-name author! \fBUsage\fP: snap [OPTIONS] set [set-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .TP \fB\fB\-t\fR\fP Parse the value strictly as JSON document .TP \fB\fB\-s\fR\fP Parse the value as a string .SS start Start services The \fIstart\fP command starts, and optionally enables, the given services. \fBUsage\fP: snap [OPTIONS] start [start-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .TP \fB\fB\-\-enable\fR\fP As well as starting the service now, arrange for it to be started on boot. .SS stop Stop services The \fIstop\fP command stops, and optionally disables, the given services. \fBUsage\fP: snap [OPTIONS] stop [stop-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .TP \fB\fB\-\-disable\fR\fP As well as stopping the service now, arrange for it to no longer be started on boot. .SS switch Switches snap to a different channel The \fIswitch\fP command switches the given snap to a different channel without doing a refresh. All available channels of a snap are listed in its 'snap info' output. \fBUsage\fP: snap [OPTIONS] switch [switch-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .TP \fB\fB\-\-channel\fR\fP Use this channel instead of stable .TP \fB\fB\-\-edge\fR\fP Install from the edge channel .TP \fB\fB\-\-beta\fR\fP Install from the beta channel .TP \fB\fB\-\-candidate\fR\fP Install from the candidate channel .TP \fB\fB\-\-stable\fR\fP Install from the stable channel .TP \fB\fB\-\-cohort\fR\fP Switch the snap into the given cohort .TP \fB\fB\-\-leave-cohort\fR\fP Switch the snap out of its cohort .SS tasks List a change's tasks The \fItasks\fP command displays a summary of tasks associated with an individual change. \fBUsage\fP: snap [OPTIONS] tasks [tasks-OPTIONS] .TP \fBAliases\fP: change .TP \fB\fB\-\-abs-time\fR\fP Display absolute times (in RFC 3339 format). Otherwise, display relative times up to 60 days, then YYYY-MM-DD. .TP \fB\fB\-\-last\fR\fP Select last change of given type (install, refresh, remove, try, auto-refresh, etc.). A question mark at the end of the type means to do nothing (instead of returning an error) if no change of the given type is found. Note the question mark could need protecting from the shell. .SS try Test an unpacked snap in the system The \fItry\fP 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. \fBUsage\fP: snap [OPTIONS] try [try-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .TP \fB\fB\-\-devmode\fR\fP Put snap in development mode and disable security confinement .TP \fB\fB\-\-jailmode\fR\fP Put snap in enforced confinement mode .TP \fB\fB\-\-classic\fR\fP Put snap in classic mode and disable security confinement .SS unalias Remove a manual alias, or the aliases for an entire snap The \fIunalias\fP command removes a single alias if the provided argument is a manual alias, or disables all aliases of a snap, including manual ones, if the argument is a snap name. \fBUsage\fP: snap [OPTIONS] unalias [unalias-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .SS unset Remove configuration options The \fIunset\fP command removes the provided configuration options as requested. $ snap unset snap-name name address All configuration changes are persisted at once, and only after the snap's configuration hook returns successfully. Nested values may be removed via a dotted path: $ snap unset snap-name user.name \fBUsage\fP: snap [OPTIONS] unset [unset-OPTIONS] .TP \fB\fB\-\-no-wait\fR\fP Do not wait for the operation to finish but just print the change id. .SS version Show version details The \fIversion\fP command displays the versions of the running client, server, and operating system. .SS wait Wait for configuration The \fIwait\fP command waits until a configuration becomes true. .SS warnings List warnings The \fIwarnings\fP command lists the warnings that have been reported to the system. Once warnings have been listed with 'snap warnings', 'snap okay' may be used to silence them. A warning that's been silenced in this way will not be listed again unless it happens again, _and_ a cooldown time has passed. Warnings expire automatically, and once expired they are forgotten. \fBUsage\fP: snap [OPTIONS] warnings [warnings-OPTIONS] .TP \fB\fB\-\-abs-time\fR\fP Display absolute times (in RFC 3339 format). Otherwise, display relative times up to 60 days, then YYYY-MM-DD. .TP \fB\fB\-\-unicode\fR \fP Use a little bit of Unicode to improve legibility. .TP \fB\fB\-\-all\fR\fP Show all warnings .TP \fB\fB\-\-verbose\fR\fP Show more information .SS watch Watch a change in progress The \fIwatch\fP command waits for the given change-id to finish and shows progress (if available). \fBUsage\fP: snap [OPTIONS] watch [watch-OPTIONS] .TP \fB\fB\-\-last\fR\fP Select last change of given type (install, refresh, remove, try, auto-refresh, etc.). A question mark at the end of the type means to do nothing (instead of returning an error) if no change of the given type is found. Note the question mark could need protecting from the shell. .SS whoami Show the email the user is logged in with The \fIwhoami\fP command shows the email the user is logged in with. .SH NOTES .IP " 1. " 4 Online documentation .RS 4 \%https://docs.snapcraft.io .RE .SH BUGS .sp Please report all bugs with \fI\%https://bugs.launchpad.net/snapd/+filebug\fP