Snap is a modern package management system that promises seamless package distribution and better dependency management in contrast to other package managers.

Unlike other Linux distros such as Ubuntu, Arch Linux doesn’t ship with Snap support by default. Fortunately, it is easy to install and configure Snap on Arch Linux.

installation of snap on arch linux

Advantages of Snap Packages

Snap is developed and maintained by Canonical, the company behind Ubuntu.The main aim of Snapis to make package management on Linux much easier. Snaps are universal, supported on all major Linux distros, and come with lots of other benefits.

Snap packages and commands are meant to work on any Linux system regardless of the underlying distro. This means you get the same experience when you move from one distro to another. This is also a huge advantage to software developers because they can just distribute a single package that will work on all Linux distros.

snapd service status on arch linux

Another key advantage of Snap packages is that they come with all the dependencies required for the software to work seamlessly. This results in better security and reliability.

Snap packages are updated automatically and you’re able to roll back to a previous version of the snap if the current one is not working properly.

If you want to experience all these advantages and more, here’s how you can install Snap on Arch Linux:

Step 1: Installing Snap on Arch Linux

The default Arch Linux repositories do not have the snapd package; you need touse the Arch User Repository (AUR)instead. The Arch User Repository is maintained by a community of Arch Linux enthusiasts, and it contains a wide range of packages that are not available on the official Arch repositories.

First, you need to install Git, if you do not already have it on your system. You can install Git using the following command:

Once installed, you can clone the snapd repository onto your machine. snapd is the daemon and runtime for managing snap packages.

Next, move into the newly cloned snapd directory using the cd command:

Build and install snapd using themakepkgutility. makepkg automates the building of packages on Arch Linux.

Follow the terminal prompts to finalize the installation.

Step 2: Configuring the snapd Service

For the snapd service to start automatically after boot, run the following command:

You can check the status of the service using:

If you’ve configured everything properly, the service should be running and enabled to load on system startup.

Further, you should enable classic snapd packages by running:

You may need to log out or restart your system for the preceding command to take effect.

Step 3: Installing Software With Snap

To list all packages installed via snap, run the following command:

The output from the preceding command will show that you do not have any snaps installed yet.

We can install a sample snap app, thehello-worldsnap package. Run the following command:

If you run thesnap listcommand again, this time it will list the installed app.

Take a look at the manual pages to learn more about snap and its command options.

How to Uninstall Snap on Arch Linux

You canuse Pacman to remove or install packageson Arch Linux. For instance, to remove snap, simply run the following command:

Snap Works on Arch Linux!

Although snap is not available by default on Arch Linux, you’re able to install it via the Arch User Repository.

Compared to traditional Linux package managers, snaps have lots of advantages such as better dependency management and universal Linux support.