Using the snaps package manager

Snaps is a cross-platform; application, packaging and deployment system; created by Canonical and originally designed for Ubuntu. However, the snaps package manager is now available for most distributions, including Arch. All the application libraries are bundled with the application itself being sandbox’d and completely separate from all other system packages.

If you haven’t already done so – install and enable snaps. Check things are working with the following command.

[[email protected] ~]$ snap version
snap     2.51.3-2
snapd    2.51.3-2
series   16
manjaro  -
kernel   5.13.19-2-MANJARO

List installed apps

[[email protected] ~]$ snap list
No snaps are installed yet. Try 'snap install hello-world'.

If you have previously updated any apps or have another version from another channel, you should have the history with the following command.

[[email protected] ~]$ snap list --all

Find a particular app

[[email protected] ~]$ snap find cherrytree
Name        Version  Publisher   Notes  Summary
cherrytree  0.99.36  hellsworth  -      Hierarchical note taking application

List all available apps

[[email protected] ~]$ snap find

View app information

[[email protected] ~]$ snap info hello-world
name:      hello-world
summary:   The 'hello-world' of snaps
publisher: Canonical✓
store-url: https://snapcraft.io/hello-world
contact:   [email protected]
license:   MIT
description: |
  This is a simple hello world example.
snap-id: buPKUD3TKqCOgLEjjHx5kSiCpIs5cMuQ
channels:
  latest/stable:    6.4 2019-04-17 (29) 20kB -
  latest/candidate: 6.4 2019-04-17 (29) 20kB -
  latest/beta:      6.4 2019-04-17 (29) 20kB -
  latest/edge:      6.4 2019-04-17 (29) 20kB -

You can use the --verbose parameter for greater detail.

Install an app

[[email protected] ~]$ snap install hello-world
2021-11-10T19:57:26Z INFO Waiting for automatic snapd restart...
hello-world 6.4 from Canonical✓ installed

You can test this with.

[[email protected] ~]$ hello-world
Hello World!

Looks good.

List app updates

[[email protected] ~]$ snap refresh --list

Update one app

[[email protected] ~]$ snap refresh hello-world

You can also use the --channel option along with either stable, candidate, beta or edge.

[[email protected] ~]$ snap refresh hello-world --channel=beta

Update all apps

[[email protected] ~]$ snap refresh

Revert app

If a new update causes you an issue, you can easily revert using the following.

[[email protected] ~]$ snap revert hello-world

Disable an app

[[email protected] ~]$ snap disable hello-world

Enable an app

[[email protected] ~]$ snap enable hello-world

Remove an app

[[email protected] ~]$ snap remove hello-world

To remove a particular version, use the --revision option.

[[email protected] ~]$ snap remove --revision=6.4 hello-world

Recent changes

[[email protected] ~]$ snap changes
ID   Status  Spawn               Ready               Summary
2    Done    today at 19:56 GMT  today at 19:57 GMT  Install "hello-world" snap
3    Done    today at 19:56 GMT  today at 19:56 GMT  Initialize device
4    Done    today at 20:53 GMT  today at 20:54 GMT  Install "cherrytree" snap
5    Done    today at 21:06 GMT  today at 21:06 GMT  Disable "hello-world" snap
6    Done    today at 21:06 GMT  today at 21:06 GMT  Enable "hello-world" snap
7    Done    today at 21:07 GMT  today at 21:07 GMT  Remove "hello-world" snap

And that’s pretty much everything I ever use!

Be the first to comment

Leave a Reply