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.

[andy@home-pc ~]$ snap version
snap     2.51.3-2
snapd    2.51.3-2
series   16
manjaro  -
kernel   5.13.19-2-MANJARO

List installed apps

[andy@home-pc ~]$ 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.

[andy@home-pc ~]$ snap list --all

Find a particular app

[andy@home-pc ~]$ snap find cherrytree
Name        Version  Publisher   Notes  Summary
cherrytree  0.99.36  hellsworth  -      Hierarchical note taking application

List all available apps

[andy@home-pc ~]$ snap find

View app information

[andy@home-pc ~]$ 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

[andy@home-pc ~]$ 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.

[andy@home-pc ~]$ hello-world
Hello World!

Looks good.

List app updates

[andy@home-pc ~]$ snap refresh --list

Update one app

[andy@home-pc ~]$ snap refresh hello-world

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

[andy@home-pc ~]$ snap refresh hello-world --channel=beta

Update all apps

[andy@home-pc ~]$ snap refresh

Revert app

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

[andy@home-pc ~]$ snap revert hello-world

Disable an app

[andy@home-pc ~]$ snap disable hello-world

Enable an app

[andy@home-pc ~]$ snap enable hello-world

Remove an app

[andy@home-pc ~]$ snap remove hello-world

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

[andy@home-pc ~]$ snap remove --revision=6.4 hello-world

Recent changes

[andy@home-pc ~]$ 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