Snap

From Bonus Bits
Jump to: navigation, search

Description

This article gives information on the Linux package manager named snap from https://snapcraft.io/

Usage

Usage: snap <command> [<options>...]

Commands can be classified as follows:

         Basics: find, info, install, list, remove
        ...more: refresh, revert, switch, disable, enable
        History: changes, tasks, abort, watch
        Daemons: services, start, stop, restart, logs
       Commands: alias, aliases, unalias, prefer
  Configuration: get, set, wait
        Account: login, logout, whoami
    Permissions: connections, interfaces, interface, connect, disconnect
      Snapshots: saved, save, check-snapshot, restore, forget
          Other: version, warnings, okay, ack, known
    Development: run, pack, try, download, prepare-image


List Installed Snaps

sudo snap list


Search for Snap Packages

sudo snap find <appname>

OR

sudo snap search <appname>

Example

sudo snap search terraform


Install a Snap Package

sudo snap install <appname>

Example

sudo snap install terraform


Info on a Snap Package

sudo snap info <appname>

Example

sudo snap info terraform


Remove a Snap Package

sudo snap remove <appname>

Example

sudo snap remove terraform


Change Channel of a Snap Package

sudo snap refresh <appname> --channel=beta

Example

sudo snap refresh terraform --channel=beta


Revert Channel of a Snap Package

sudo snap revert <appname>

Example

sudo snap revert terraform


Sources