Mint

How to Install Snap on Linux Mint 21

How to Install Snap on Linux Mint

Snap is a popular cross-distribution package manager that enables users to easily install and manage software packages and applications on various Linux distributions. It offers a convenient way to install desired applications/packages with all their dependencies and also ensures compatibility.

In the Linux Mint systems, Snap support is not enabled by default. Thus, you cannot install the Snap packages or app on your system. To install Snaps, you have to install and enable Snap on the Linux Mint system to get a streamlined experience for managing Snaps (software packages and applications).

Quick Outline

How to Install/Enable Snap on Linux Mint

To install and enable Snap on your Linux Mint systems, follow the below-provided steps:

Step 1: Delete “nosnap.pref” File From System

First, remove the “nosnap.pref” file from the system’s APT directory which prevents users from installing Snap applications. You can delete this file using the “sudo rm” command along with its path:

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

Alternatively, you can move this file to another desired directory for backup purposes:

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

Step 2: Update APT Cache

After deleting or moving the file from the APT directory, run the given command to update the APT repository’s cache:

sudo apt update

Subsequently, the APT repository’s packages will be updated:

Step 3: Install Snap Daemon/Service

Then, install the Snap Daemon (snapd) that manages the Snaps on your Linux Mint system using the provided command:

sudo apt install snapd

By doing so, the Snap Daemon package will be installed:

Step 4: Enable Snap Service

After that, you also need to enable the Snap service so that on every restart/reboot, the Snap Daemon will be running which allows you to install the Snaps:

sudo systemctl enable snapd

Step 5: Verification

Finally, execute the given command to ensure that the Snap has been installed and enabled on your system:

sudo systemctl status snapd

The below output indicates that Snap has been enabled successfully:

How to Use Snap on Linux Mint

You can use Snap to search, install, and manage desired applications and packages on Linux Mint systems via Snap commands. Go through the provided use cases to understand how Snap can be used on the Linux Mint system:

Note: We will be using “Skype” Snap as an example to address all the above-mentioned cases.

Search Snaps

To search for a specific Snap package or application on Linux Mint, use the “sudo snap find <package-name>” command and specify the desired package or application name as seen below:

sudo snap find skype

The below output shows the name, version, publisher, and summary of the related searched package:

Install Snaps

To install the desired Snaps from the Snap store on the Linux Mint system, utilize the “sudo snap install <package-name>” command:

sudo snap install skype

As you can see, Skype has been installed successfully using Snap:

Run Snaps

If you want to run the Snap application that you have installed from the Snap store, simply type the name of that application in the terminal as seen below:

skype

It can be seen that Skype has been launched successfully:

Alternatively, you can reboot your system and open the Skype application from the Menu. To do so, first, click on the “Menu” button and search “Skype” in the search box. Then, click on “Skype” app to open it:

Show Installed Snaps Information

If you want to display the information of the specific installed Snaps, utilize the “sudo snap info <package-name>” command:

sudo snap info skype

In the below output, the detailed information of the Skype app can be seen:

List Installed Snaps

To list all the Snap packages or applications installed on your system from the Snap store, type out the following command:

sudo snap list

Update Snaps

If you want to update the specific Snap package/application to the latest version, use the “sudo snap refresh <package-name>” command:

sudo snap refresh skype

Moreover, run the following command if you want to update all the installed Snaps:

sudo snap refresh

Downgrade Snaps

If you are facing issues after updating your Snap applications, you can revert to the previous version using the “sudo snap revert <package-name>” command. This command will only work if you have the application’s previous(earlier) version installed on the Linux Mint system. Apart from that, it will display an error. For example, we are trying to revert to Skype’s earlier version:

sudo snap revert Skype

As you can see, we got the error because we did not have the previous version of Skype on our system:

Enable/Disable Snaps

You may want to disable your Snap applications if you are not using it anymore. You can use the “sudo snap disable <package-name>” command to disable it instead of removing it from your system:

sudo snap disable skype

You can enable the Snap application again through the “sudo snap enable <package-name>” command:

sudo snap enable skype

Uninstall/Remove Snaps

To remove or uninstall the specific Snap application or package from your Linux Mint system, use the “sudo snap remove <package-name>” command:

sudo snap remove skype

According to the below output, Skype has been removed successfully from the system:

How to Install Snap Store on Linux Mint

Snap store is the Graphical user interface of “snapd”. If you prefer GUI over CLI, you can install Snap Store on your Linux Mint system by executing the below command:

sudo snap install snap-store

You can launch the Snap store from the Menu by searching for it in the search box:

Once, the Snap Store is launched, you can now use it to search, install, and remove Snap packages and applications:

How to Remove/Disable Snap on Linux Mint

If you do not need Snap anymore for Snap application installation and you also want to remove all the installed Snap applications from your system, utilize the provided command:

sudo apt autoremove snapd -y

You can also create a new “nosnap.pref” file to block the installation of Snap applications. Execute the given commands to automatically create the file:

sudo tee /etc/apt/preferences.d/nosnap.pref<<EOF

Package: snapd

Pin: release a=*

Pin-Priority: -10

EOF

That was all about installing, using, and removing Snap on Linux Mint.

Final Thoughts

Snap is the widely used package manager for installing and handling packages and applications on Linux distributions. You can easily install and enable Snap on your Linux Mint system by removing the “nosnap.pref” file from the APT directory file and executing the “sudo apt install snapd” command. You can use Snap to install, run, search, list, remove, and manage Snap packages and applications on your Linux Mint system. Moreover, you can also install Snap Store which is the GUI version of “snapd” for managing Snap packages. This article has illustrated the method to install, use, and remove Snap on Linux Mint.

Similar Posts