Installing snap on openSUSE


Snap can be installed from the command line on openSUSE Leap 42.3, Leap 15 and Tumbleweed.

Add the repository

You need first add the snappy repository from the terminal. Leap 15 users, for example, can do this with the following command:

$ sudo zypper addrepo --refresh snappy
Repository 'snappy' successfully added

Swap out openSUSE_Leap_15.0 for either openSUSE_Leap_42.3 or openSUSE_Tumbleweed if you’re using a different version of openSUSE.

With the repository added, import its GPG key:

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

Finally, upgrade the package cache to include the new snappy repository:

$ sudo zypper dup --from snappy

Install snapd

Snap can now be installed with the following:

$ sudo zypper install snapd

You then need to either reboot, logout/login or source /etc/profile to have /snap/bin added to PATH.

Additionally, enable and start both the snapd and the snapd.apparmor services with the following commands:

$ sudo systemctl enable snapd
$ sudo systemctl start snapd

Tumbleweed users also need to run the following:

$ sudo systemctl enable snapd.apparmor
$ sudo systemctl start snapd.apparmor

You now have snapd installed and ready to go.


If you don’t see the snapd update on your system, make sure the repository is refreshing correctly. If it’s not, remove and re-add the repository with the following command (–refresh is important):

$ sudo zypper removerepo snappy
$ sudo zypper addrepo --refresh snappy

As above, replace openSUSE_Leap_15.0 with your specific version of openSUSE.

Snap Documentation
Installing snapd
Installing snapd

There is no need to do a full distribution upgrade with sudo zypper dup as it could have unintended consequences to the system. There is also a typo in the command for adding a repository (the ` character at the end of the command).

The more adequate and much safer way to add a repository in OpenSuse, accept its GPG key and activate the repo would be:

$ sudo zypper addrepo --refresh snappy
$ sudo zypper --gpg-auto-import-keys refresh
$ sudo zypper dup --from snappy


Thanks for the these suggestions and the typo catch. I’ve updated the guide accordingly.


Well, if we’re making things simpler, why not just use the upstream repo’s suggested name and then auto-pull missing keys during update. :wink:

sudo zypper ar --refresh
sudo zypper --gpg-auto-import-keys dup --from system_snappy


Missing an important step to activate snapd.apparmor.service. Without it applications won’t start after reboot.

sudo systemctl enable snapd.apparmor
sudo systemctl start snapd.apparmor


I just tested it, and you’re right - I’ve updated the text. Thank you!


Failed to enable unit: Unit file snapd.apparmor.service does not exist.


Could you tell us which version of openSUSE you’re using and I’ll give it a go. Thanks.


UPDATE: I apologize, I spoke too soon, I fixed the issue, for some reason my repositories had system:/snappy/openSUSE_Leap_15.0 set for snappy instead of openSUSE_Tumbleweed
For anyone else having trouble, I was able to fix the issue by listing, removing and adding the correct repository with

zypper lr -d

replace 13 with the # listed for snappy

sudo zypper rr 13

and then update properly with the correct Tumbleweed repo URL

sudo zypper addrepo --refresh snappy
sudo zypper dup --from snappy
sudo systemctl enable snapd.apparmor.service

I’ve been getting the same for a while now, I first noticed it about a month ago and have gotten it with every update since and I update regularly, running OpenSUSE Tumbleweed

The following product is going to be upgraded:
openSUSE Tumbleweed  20190214-0 -> 20190219-0

(143/143) Installing: snapd-2.37.3-lp150.1.1.x86_64 ...................................................................................................................................................................................................................................[done]
Additional rpm output:
Please reboot, logout/login or source /etc/profile to have /snap/bin added to PATH.
On a Tumbleweed system you need to run: systemctl enable snapd.apparmor.service

brbfapping@dagobah:~> systemctl enable snapd.apparmor.service
Failed to enable unit: Unit file snapd.apparmor.service does not exist.
brbfapping@dagobah:~> sudo systemctl enable snapd.apparmor
Failed to enable unit: Unit file snapd.apparmor.service does not exist.



here, snapd.service is installed & up (?), but there’s no trace of snapd.apparmor.service

lsb_release -rd
	Description:    openSUSE Leap 15.0
	Release:        15.0

zypper lr Snappy
	Alias          : Snappy
	Name           : Snappy
	URI            :
	Enabled        : Yes
	GPG Check      : (r ) Yes
	Priority       : 99 (default priority)
	Autorefresh    : On
	Keep Packages  : Off
	Type           : rpm-md
	GPG Key URI    :
	Path Prefix    :
	Parent Service :
	Keywords       : ---
	Repo Info Path : /etc/zypp/repos.d/Snappy.repo
	MD Cache Path  : /var/cache/zypp/raw/Snappy

zypper dup --from Snappy
zypper install snapd
rpm -qa | grep -i snapd

systemctl enable snapd
systemctl enable snapd.apparmor
	Failed to enable unit: Unit file snapd.apparmor.service does not exist.

systemctl list-units --all | grep -i snap | grep service
  snapd.failure.service                                                                                                                      	loaded    inactive   dead      Failure handling of the snapd snap                                            
  snapd.service                                                                                                                              	loaded    active     running   Snappy daemon                                                                 

systemctl status snapd -l
	● snapd.service - Snappy daemon
	   Loaded: loaded (/usr/lib/systemd/system/snapd.service; enabled; vendor preset: disabled)
	  Drop-In: /etc/systemd/system/snapd.service.d
	   Active: active (running) since Mon 2019-03-25 16:09:15 PDT; 5s ago
	 Main PID: 8269 (snapd)
	    Tasks: 10 (limit: 9830)
	   CGroup: /system.slice/snapd.service
	           └─8269 /usr/lib/snapd/snapd

	Mar 25 16:09:14 dev04.lan snapd[8269]: AppArmor status: apparmor not enabled
	Mar 25 16:09:14 dev04.lan snapd[8269]: daemon.go:379: started snapd/2.37.4-lp150.1.1 (series 16; classic; devmode) opensuse-leap/15.0 (amd64) linux/5.0.3-lp150.6.g2a31831-de.

Is that^^ still current instruction, and a dependency has changed? Is there additional install step required?


Those are applicable only to openSUSE Tumbleweed for now. We believe that once the snapd package migrates to the openSUSE repository it will also not be needed because snapd will be added to the system presets package, which will enable appropriate services automatically.