How to Install and Enable Snap on Linux Mint

Snap is a universal package management system that bundles applications with all their dependencies into self-contained packages. Unlike traditional package managers, Snap packages work identically across different Linux distributions, update automatically in the background, and run in sandboxed environments for additional security. Linux Mint ships with Flatpak pre-installed and blocks Snap by default, but enabling Snap expands your software options to include applications that may not be available through APT or Flatpak, such as certain proprietary tools or developer previews.

This guide walks you through removing the Snap block, installing the Snap service, testing that everything works, and optionally reversing the process if you decide Snap is not for you. By the end, you will have a fully functional Snap installation ready to use alongside your existing package managers.

Linux Mint Version Reference

Linux Mint is based on Ubuntu LTS releases. The commands in this guide work on both supported Mint versions, but understanding the underlying Ubuntu base helps when troubleshooting or adding repositories for other software.

Linux Mint VersionMint CodenameUbuntu BaseUbuntu Codename
Linux Mint 22.xWilma, XiaUbuntu 24.04 LTSnoble
Linux Mint 21.xVanessa, Vera, Victoria, VirginiaUbuntu 22.04 LTSjammy

Remove the Snap Block (nosnap.pref)

Linux Mint includes an APT preferences file that prevents Snap from being installed. This file, located at /etc/apt/preferences.d/nosnap.pref, instructs APT to reject any package that would pull in snapd as a dependency. Before installing Snap, you must remove or rename this file.

To remove the file permanently, run the following command:

sudo rm /etc/apt/preferences.d/nosnap.pref

Alternatively, if you want the option to restore the block later without recreating the file manually, rename it instead:

sudo mv /etc/apt/preferences.d/nosnap.pref /etc/apt/preferences.d/nosnap.pref.backup

After removing or renaming the file, refresh your package cache so APT recognizes that Snap is now installable:

sudo apt update

Install the Snap Service (snapd)

With the block removed, install the snapd package, which provides the Snap daemon and command-line tools:

sudo apt install snapd -y

The -y flag automatically confirms the installation prompt. Once the installation completes, verify that Snap is accessible by checking its version:

snap version

Expected output on Linux Mint 22 (Ubuntu 24.04 base):

snap    2.72+ubuntu24.04
snapd   2.72+ubuntu24.04
series  16
ubuntu  24.04
kernel  6.8.0-51-generic

Expected output on Linux Mint 21 (Ubuntu 22.04 base):

snap    2.72+ubuntu22.04
snapd   2.72+ubuntu22.04
series  16
ubuntu  22.04
kernel  5.15.0-130-generic

The snapd line may show โ€œunavailableโ€ immediately after installation if the Snap socket has not started yet. This resolves after enabling the service or rebooting.

Enable the Snap Service

Enable the Snap socket and service so they start automatically on boot and are available immediately:

sudo systemctl enable --now snapd.socket
sudo systemctl enable --now snapd.service

Verify the service is running:

systemctl status snapd.service --no-pager

Expected output showing an active service:

โ— snapd.service - Snap Daemon
     Loaded: loaded (/lib/systemd/system/snapd.service; enabled; preset: enabled)
     Active: active (running) since Mon 2024-12-30 10:15:32 UTC; 5s ago
   Main PID: 12345 (snapd)
      Tasks: 10 (limit: 4567)
     Memory: 35.2M
        CPU: 245ms
     CGroup: /system.slice/snapd.service
             โ””โ”€12345 /usr/lib/snapd/snapd

Install the Snap Core Runtime

The core snap provides essential runtime components that many other snaps depend on. Installing it now prevents delays when you install your first application:

sudo snap install core

If you encounter an error about the Snap socket not being available, reboot your system first:

sudo reboot

Test the Snap Installation

Verify that Snap is working correctly by installing and running the hello-world test package:

sudo snap install hello-world && hello-world

Expected output confirming a successful installation:

hello-world 6.4 from Canonicalโœ“ installed
Hello World!

If you see โ€œHello World!โ€ printed to your terminal, Snap is installed and working correctly.

Install Applications with Snap

With Snap enabled, you can install applications from the Snap Store. The basic syntax for installing a snap is:

sudo snap install <package-name>

For example, to install Telegram:

sudo snap install telegram-desktop

Some snaps require the --classic flag because they need access to system resources outside the sandbox. The Snap Store page for each application indicates when this is required. For example, to install Visual Studio Code on Linux Mint:

sudo snap install code --classic

Install the Snap Store GUI (Optional)

If you prefer browsing and installing applications through a graphical interface, install the Snap Store:

sudo snap install snap-store

After installation, launch Snap Store from your application menu under Administration, or run snap-store from the terminal.

Manage Installed Snaps

List all installed snaps:

snap list

Example output showing installed snaps:

Name         Version    Rev    Tracking       Publisher   Notes
core         16-2.72    18507  latest/stable  canonicalโœ“  core
hello-world  6.4        29     latest/stable  canonicalโœ“  -

Update all installed snaps to their latest versions:

sudo snap refresh

Remove a specific snap:

sudo snap remove <package-name>

Troubleshooting Snap Issues

Cannot Communicate with Server Error

If you see an error like โ€œcannot communicate with server: Post http://localhost/v2/snaps: dial unix /run/snapd.socket: connect: no such file or directoryโ€, the Snap socket is not running.

Start the socket manually and enable it for future boots:

sudo systemctl start snapd.socket
sudo systemctl enable snapd.socket

If the socket still fails to start, reboot your system to ensure all Snap components initialize correctly:

sudo reboot

Snap Applications Not Appearing in Menu

After installing a snap, the application may not appear in your application menu immediately. The menu system needs to detect the new .desktop file. The simplest fix is to log out and back in.

If you prefer not to log out, you can restart your desktop environment from the terminal. The command depends on which Linux Mint edition you use:

  • Cinnamon: cinnamon --replace &
  • MATE: mate-panel --replace &
  • Xfce: xfce4-panel -r

Alternatively, you can launch the application directly from the terminal using the snapโ€™s command name, which is usually the package name.

Classic Confinement Errors

Some snaps require --classic confinement to access files outside their sandbox. On Ubuntu-based systems like Linux Mint, these snaps expect /snap to exist as a directory. Ubuntu creates this automatically, but Linux Mint does not.

If you encounter errors mentioning classic confinement or see โ€œcannot installโ€ฆ classic confinement requires snaps under /snapโ€, create the required symbolic link:

sudo ln -s /var/lib/snapd/snap /snap

This links the actual snap mount point to where classic snaps expect to find it. The symlink persists across reboots and only needs to be created once.

Remove Snap and Restore the Block

If you decide Snap is not for you, removing the snapd package automatically uninstalls all snap packages you have installed. You do not need to remove each snap individually first.

Remove Snap and clean up orphaned dependencies:

sudo apt autoremove snapd --purge

Expected output showing snaps being removed during the process:

Removing snapd (2.72+ubuntu24.04) ...
Stopping snap.core.hook.configure.service...
Removing snap core and target directories...
Purging configuration files for snapd (2.72+ubuntu24.04) ...

Restore the Snap Block

If you renamed the block file earlier, restore it to prevent future APT operations from accidentally installing Snap:

sudo mv /etc/apt/preferences.d/nosnap.pref.backup /etc/apt/preferences.d/nosnap.pref

If you deleted the file entirely, recreate it with the following command:

This creates an APT preferences file that assigns a negative priority to the snapd package, preventing APT from installing it as a dependency of other packages.

sudo tee /etc/apt/preferences.d/nosnap.pref <<EOF
# To prevent repository packages from triggering the installation of Snap,
# this file forbids snapd from being installed by APT.
# For more information: https://linuxmint-user-guide.readthedocs.io/en/latest/snap.html

Package: snapd
Pin: release a=*
Pin-Priority: -10
EOF

Verify the block is in place by attempting to install snapd, which should now be rejected:

apt-cache policy snapd

Expected output showing the negative priority:

snapd:
  Installed: (none)
  Candidate: (none)
  Version table:
     2.72+ubuntu24.04 -10
        500 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages

Snap vs Flatpak: When to Use Each

Linux Mint includes Flatpak with Flathub pre-configured. Both Snap and Flatpak solve similar problems, but they have different strengths.

Consider using Snap when:

  • The application you need is only available as a Snap (check snapcraft.io)
  • You want automatic background updates without manual intervention
  • You need server-side snaps for tools like LXD, MicroK8s, or Certbot

Consider using Flatpak when:

  • The application is available on both platforms (Flatpak integrates better with Mint)
  • You prefer the Flathub ecosystem and its community-driven model
  • You want to avoid additional setup since Flatpak is already configured

Both systems can coexist on the same machine without conflicts. Many users install Snap for specific applications while using Flatpak as their primary universal package source.

Conclusion

You now have Snap installed and configured on Linux Mint, giving you access to thousands of additional applications through the Snap Store. Whether you use it alongside Flatpak for maximum software availability or focus on specific tools only available as Snaps, the universal package system expands your options while maintaining automatic updates and sandboxed security.

5 thoughts on “How to Install and Enable Snap on Linux Mint”

Leave a Comment

Let us know you are human: