How To Install snapd on CentOS 8

snapd is A transactional software package manager

Introduction

In this tutorial we learn how to install snapd on CentOS 8.

What is snapd

Snappy is a modern, cross-distribution, transactional package manager designed for working with self-contained, immutable packages.

We can use yum or dnf to install snapd on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install snapd.

Install snapd on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install snapd using dnf by running the following command:

sudo dnf -y install snapd

Install snapd on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install snapd using yum by running the following command:

sudo yum -y install snapd

How To Uninstall snapd on CentOS 8

To uninstall only the snapd package we can use the following command:

sudo dnf remove snapd

snapd Package Contents on CentOS 8

/etc/profile.d/snapd.sh
/etc/sysconfig/snapd
/etc/xdg/autostart/snap-userd-autostart.desktop
/usr/bin/snap
/usr/bin/snapctl
/usr/lib/.build-id
/usr/lib/.build-id/3d
/usr/lib/.build-id/3d/806160f8d924641619e80ca3bed72fadc788b3
/usr/lib/.build-id/4d
/usr/lib/.build-id/4d/2ae13085b7e48ae2b4fbb508d81d643f071616
/usr/lib/.build-id/69
/usr/lib/.build-id/69/a291f9c303cb5e6e6f51bbf0a0e77dd87531d9
/usr/lib/.build-id/90
/usr/lib/.build-id/90/88ed9e38941e3661aace00531dbcf8b0dbca3a
/usr/lib/.build-id/cd
/usr/lib/.build-id/cd/135d7eb6a5521f15ad1e17761a51f7355fb93c
/usr/lib/.build-id/e6
/usr/lib/.build-id/e6/daf701b43c486a0904682a0c4bdd412cf8d78a
/usr/lib/environment.d/990-snapd.conf
/usr/lib/systemd/system-environment-generators/snapd-env-generator
/usr/lib/systemd/system/snapd.autoimport.service
/usr/lib/systemd/system/snapd.failure.service
/usr/lib/systemd/system/snapd.seeded.service
/usr/lib/systemd/system/snapd.service
/usr/lib/systemd/system/snapd.socket
/usr/lib/systemd/user/snapd.session-agent.service
/usr/lib/systemd/user/snapd.session-agent.socket
/usr/libexec/snapd
/usr/libexec/snapd/complete.sh
/usr/libexec/snapd/etelpmoc.sh
/usr/libexec/snapd/info
/usr/libexec/snapd/snap-exec
/usr/libexec/snapd/snap-failure
/usr/libexec/snapd/snap-mgmt
/usr/libexec/snapd/snap-mgmt-selinux
/usr/libexec/snapd/snapctl
/usr/libexec/snapd/snapd
/usr/libexec/snapd/snapd.run-from-snap
/usr/share/applications/io.snapcraft.SessionAgent.desktop
/usr/share/applications/snap-handle-link.desktop
/usr/share/bash-completion/completions/snap
/usr/share/dbus-1/services/io.snapcraft.Launcher.service
/usr/share/dbus-1/services/io.snapcraft.SessionAgent.service
/usr/share/dbus-1/services/io.snapcraft.Settings.service
/usr/share/dbus-1/session.d/snapd.session-services.conf
/usr/share/dbus-1/system.d/snapd.system-services.conf
/usr/share/doc/snapd
/usr/share/doc/snapd/MOVED.md
/usr/share/doc/snapd/README.md
/usr/share/doc/snapd/error-kinds.go
/usr/share/licenses/snapd
/usr/share/licenses/snapd/COPYING
/usr/share/man/man8/snap.8.gz
/usr/share/man/man8/snapd-env-generator.8.gz
/usr/share/polkit-1/actions/io.snapcraft.snapd.policy
/usr/share/zsh
/usr/share/zsh/site-functions
/usr/share/zsh/site-functions/_snap
/var/cache/snapd
/var/lib/snapd
/var/lib/snapd/assertions
/var/lib/snapd/cookie
/var/lib/snapd/dbus-1
/var/lib/snapd/dbus-1/services
/var/lib/snapd/dbus-1/system-services
/var/lib/snapd/desktop
/var/lib/snapd/desktop/applications
/var/lib/snapd/device
/var/lib/snapd/hostfs
/var/lib/snapd/inhibit
/var/lib/snapd/lib
/var/lib/snapd/lib/gl
/var/lib/snapd/lib/gl32
/var/lib/snapd/lib/glvnd
/var/lib/snapd/lib/vulkan
/var/lib/snapd/mount
/var/lib/snapd/seccomp
/var/lib/snapd/seccomp/bpf
/var/lib/snapd/snap
/var/lib/snapd/snap/README
/var/lib/snapd/snap/bin
/var/lib/snapd/snaps
/var/lib/snapd/state.json
/var/snap

References

Summary

In this tutorial we learn how to install snapd on CentOS 8 using yum and dnf.