How to install Snap on OpenSUSE Leap

Endrit Qerreti

Endrit Qerreti

In this tutorial, you will learn how to install Snap on OpenSUSE Leap.

Ubuntu comes with Snap preinstalled. However, when it comes to other distros, such as OpenSUSE, snap is not installed by default.

To use Snap on OpenSUSE, one must install it first.

Installing Snap on OpenSUSE can be done by installing the official package called snappy on OpenSUSE repository.

Install Snap on OpenSUSE

Step 1 - Add Snap Repository

Before installing Snap on your system, first you must add its repository. To add Snap repository on your OpenSUSE machine, run the following command below

sudo zypper addrepo --refresh \
    https://download.opensuse.org/repositories/system:/snappy/openSUSE_Leap_15.5 \
    snappy

💡
Note: In this tutorial, we are using OpenSUSE Leap 15.5. If you are using another version of OpenSUSE Leap, then make sure to change the version on the repository source above. To do this, simply replace 15.5 with your version.

Step 2 - Import Snap GPG Key

Once you have added Snap repository on your OpenSUSE machine, proceed to import the GPG key of Snap on your system.

To import Snap GPG key, simply run the command below

sudo zypper --gpg-auto-import-keys refresh

Step 3 - Upgrade Package cache

In order to be able to use the new Snap repository, you need first to update the repository database on your machine.

To do this, simply run the command below

sudo zypper dup --from snappy

Step 4 - Install Snap

Now simply install Snap, by running the following

sudo zypper install snapd

Step 6 - Start Snapd process

Snapd process needs to be automatically started so that you can use snap everytime you login on your system.

To enable snapd process, you can use the systemctl command

sudo systemctl enable --now snapd

Uninstall Snap on OpenSUSE

If you want to uninstall Snap from your system, you can do so by using zypper package manager

sudo zypper remove snapd

Alternatively, you can also delete snap binary manually, snap binary is located at /usr/bin/snap

sudo rm -rf /usr/bin/snap

Conclusion

In this tutorial, you learned how to install Snap on OpenSUSE Leap 15.5. Once snap has been installed on your system, you can now use Snap to install snap packages on your OpenSUSE machine.