Installing applications on Debian 12 is made quite easy with the help of various package managers as they include repositories of nearly all of the applications that support Linux platforms. Each of the Linux distributions has a package manager as in the case of Debian systems it is an Advanced Packaging Tool whereas for Arch Linux it is Pacman. However, there are third-party package managers like Snap that can be used to install applications in case any application is not available in the default repository, or it is an older version.
Outline:
How to Install Snap on Debian 12
The package manager has the configuration files, executables, binary files, and other information about each and every application that it can install. Snap package manager, like other package managers can also install, update, remove, and manage applications in a Linux system.
It can be operated through a command line but also has a GUI application known as a snap store. However, for the snap store, the snap should be installed first. To install snap on Debian 12 execute the below command but it is always recommended to update the default package manager:
Once the snap is installed, verify its installation by checking the version of the package manager by executing:
Now check the snap service if it is running or not, usually, it is inactive because to run the snap service it is necessary to install snap core as it is responsible for providing a runtime environment for all the snap applications:
Now install snap core on your Debian 12 by using the snap package manager and afterward check the service status and you will see that the snap service has been activated:
Now if by any means the snap service is still not active then try enabling it or reinstalling it:
Now create a symbolic link so that snap can work properly as this will enable the classic snap support which in the case of Linux systems like Arch Linux and Debian is required. The classic snap support primarily applies to files that are not strictly confined and require access to files related to systems or libraries. The symbolic link just points to the directory that helps access the files without copying them into any other non-system directory:
Snap Basic Commands
Applications can be installed on Debian using the snap package manager in a similar way as in the case of the default package manager. So here are the basic commands discussed one by one for using snap package manager on Debian 12:
1: Installing a Package on Debian using snap
To install a package all you need is to know the package name and here is the syntax for installing any application or package on Debian using snap:
For illustration, I have installed Spotify on Debian 12 using the above syntax
Sometimes you might encounter an error “snap application-name not found” while installing through snap though it is available on snap store:
In that case, you might be giving the wrong name of the application as in the image above I have tried to install Adguard which is available on snap but the name for the application that I am writing is wrong. So, to check the proper command go to the snap store in your browser and after searching for that application click on install to get the correct command:
2: Finding a Package in Snap
Sometimes the application installed on the Debian can experience compatibility issues either due to version or due to the absence of dependencies that make it run better. Also, before installing any application, it is necessary to check if the application is present in the snap repository so for that you can use the find command as in the syntax below:
For demonstration, I have listed the details for the Spotify application, and in the output, I have got different names for the related applications along with their version, publisher, and summary:
3: Listing Packages Installed Through Snap
In Debian, you can have the list for all the packages installed through snap and for that just execute the below command as it can be helpful when either updating applications or removing any unused applications:
4: Updating a Package Through Snap
Keeping the applications updated on Debian contributes to their smooth function and also provides the opportunity for users to get their hands on new features introduced in the applications. Here is the syntax for updating snap applications on Debian:
5: Removing a Package using Snap
To remove an application if installed through snap just use the remove command along with the application name:
6: Finding Package Information in Snap
Finding a package in the snap repository can only give the version and the publisher’s name but if you want to know more about the package, especially the dependencies it requires to run, then use the info command:
Further, if you need help regarding the commands for interacting with snap through the command line interface consult snap help by executing:
Installing Snap Store on Debian 12
The snap store is the GUI version of snapd, and it is just like an application store which is suitable for users who are not good with using the command line interface of Debian, To install snap store the snap core and the snapd should be installed, for installing snap store execute:
Now once the store is installed you can run it from the terminal and might face a number of errors as in the image below which will cause the snap store not to function smoothly:
To brush away these errors you need to update the snap store to the edge version, these errors are primarily from the developer’s side:
Once you have updated the snap store to the edge version, run it again by executing:
Now to install any application just search for it and click on the install button, the same is the case for removing the application but in that case click on the remove option.
Removing Snap and Snap Store from Debian 12
To remove snap completely from Debian 12 you need to use the purge command and by using it all the related data which includes snap core will be uninstalled:
To remove snap-store from Debian simply use the remove command with snap like this:
Conclusion
To install snap on Debian 12, use the advanced packaging tool to install snap daemon and afterward install the core which provides the runtime environment for applications installed through snap. Next, create a symbolic link to enable the classic snap support. You can also install the snap store which is its GUI version but don’t forget to update it to the edge version so that it can run properly. To remove snap simply use the purge command as it will remove all the data for snap automatically.