Skip to content

Snap Packages on Ubuntu

homepage-banner

Snap offers several benefits over traditional package managers like apt. One of the most significant benefits is that Snap packages are self-contained, meaning that they include all the dependencies and libraries required to run the software. This makes it easy to install and run software without worrying about compatibility issues or dependency conflicts.

Installing

sudo apt update 
sudo apt install snapd 
sudo apt install core 

Basic usage

snap version
sudo snap install <snap-name>
sudo snap remove <snap-name>
snap find <package-name>
snap install <package-name> --channel=<channel>
snap list
snap info <package_name>
## Update Installed Snaps
sudo snap refresh --list
sudo snap refresh <snap_package>
## Downgrade Snap Package
sudo snap revert <snap_package>

sudo snap disable <snap_package>
sudo snap enable <snap_package>

snap services
sudo snap start <service_name>
sudo snap stop < service_name>
sudo snap restart <service_name>
sudo snap remove <snap_package>

Create your own snap

sudo snap install --classic snapcraft

snapcraft init

snapcraft

Disable snapd

sudo systemctl stop snap*
sudo systemctl disable snapd.service
sudo systemctl disable snapd.socket
sudo systemctl disable snapd.seeded.service
sudo systemctl disable snapd.snap-repair.timer
sudo systemctl mask snapd
sudo apt purge snapd -y
sudo apt-mark hold snapd

Reference

  • https://snapcraft.io/
  • https://ubuntu.com/core/services/guide/snaps-intro
  • https://ubuntu.com/tutorials/create-your-first-snap
  • https://www.putorius.net/beginners-guide-snap-packages-linux.html
  • https://linux.how2shout.com/how-to-install-snap-packages-on-redhat/
Feedback