This tutorial shows how to enable Snap package format support in Linux Mint 22.
Snap is an universal Linux package runs in sandbox environment. It’s developed by by Canonical, the company behind Ubuntu, and enabled by default in Ubuntu since 20.04.
Linux Mint does NOT like Snap, and disables this format by default! Because Snap Store, the only source to get snap package, is proprietary software, though Snap itself is open-source. The developer team announced this decision few years ago:
A year later, in the Ubuntu 20.04 package base, the Chromium package is indeed empty and acting, without your consent, as a backdoor by connecting your computer to the Ubuntu Store. Applications in this store cannot be patched, or pinned. You can’t audit them, hold them, modify them or even point snap to a different store. You’ve as much empowerment with this as if you were using proprietary software, i.e. none. This is in effect similar to a commercial proprietary solution, but with two major differences: It runs as root, and it installs itself without asking you.
However, users always have their own choices. If you want, it’s easy to re-enable Snap support in Linux Mint.
Why Snap?
The classic Linux packages (e.g, .deb
and .rpm
) do NOT include all the run-time libraries. Some of the required libraries are available in other packages as dependencies.
Meaning, installing package A may also need to install B as dependency package. Many app packages may depend on same package, so, user does not need to install that dependency package again and again.
It saves disk space, but also cause issue! Newer app packages may depend on higher versions of dependency libraries, but your system has old ones. Or, you installed newer dependency libraries, but other app packages depend on old ones of the same libraries. System core libraries are usually hard to upgrade, and Linux does not allow to install multiple copies of same package (unless with different names). So, it runs into dependency hell!
To workaround the issue, Flatpak, Snap, and AppImage were burn. They run the app packages in sandbox environment, with most libraries in bundle.
Flatpak has closer relationship to GNOME, Fedora, and RHEL, while Snap is powered by Ubuntu. Open-source community seems to prefer Flatpak, but user has its own choice, isn’t it?
Un-block and Enable Snap support in Linux Mint
Linux Mint includes a config file that blocks snap daemon package. To un-block it, simply move away that file by running the commands below one by one.
- First, press
Ctrl+Alt+T
to open up a terminal window. When it opens, run command to navigate to theapt
package manager’s preferences config directory:cd /etc/apt/preferences.d
- Then, move away that config file by running command:
sudo mv nosnap.pref nosnap.pref.bak
- Finally, update apt cache to apply change:
sudo apt update
When done, run command to install the Snap daemon package for the package format support:
sudo apt install snapd
Install/Uninstall Snap Apps:
After enabled Snap support, you may go to the Snap Store via the link page below:
Then, find out your desired app and go to its individual web page. Finally, click on “Install” button and use the command in pop-over to install.
To uninstall a Snap package, first, use command to list all installed package and find out the app name you want to uninstall:
snap list
Then, run the command below to remove it:
sudo snap remove APP_NAME_HERE
How to Restore (Disable Snap Package Support)
To disable the Snap package again, first run the last 2 commands again and again to uninstall all the installed Snap apps.
Then, run the command below to uninstall snap daemon package:
sudo apt remove --autoremove snapd
Finally, revert back the apt config file to block it:
cd /etc/apt/preferences.d/ && sudo mv nosnap.pref.bak nosnap.pref
And, also run sudo apt update
to apply change.