What is the Usage of the Snap Packages in Debian 12

The snap packages are used to install different application software on Linux distributions. Most of the packages are not included in the default repository of Linux distributions, still, they can be downloaded either from their official source or from some third-party platforms. 

Now Linux users not only manage the snap packages on Linux but also can create their own snaps. These snaps cannot only launch on desktops but also IoT devices and servers. 

This post will help the users understand the usage of the snap packages on Debian 12 with the following outline:

  1. What are the Snap Packages
  2. How to Install the snapd on Debian 12
  3. How to Install the Graphical User Interface of snapd on Debian 12
  4. How to Manage the Snap Packages on Debian 12
  5. How to Uninstall the snapd on Debian 12

Let’s start the post by understanding the Snap Packages. 

What are the Snap Packages?

The snap package is the complete application package that contains all the configuration files, libraries, and dependencies of the application. These snaps are designed not only for a particular distribution like the apt packages but are universal for desktops and servers. 

The key features of the snap packages are: 

  • Snap packages can be run on different Linux distributions
  • It supports the atomic update that means entire package with all its configuration files is updated with a single command
  • The security of the snaps is ensured in both cases, open source and proprietary snaps
  • Snaps can be updated by configuring auto-updates
  • Snaps include all the dependencies in a single package

How to Install the snapd on Debian 12?

To manage the snaps on Debian 12, a “snapd” command line utility should be installed. The snapd can be installed by following the below-mentioned commands. 

Step 1: Launch the Terminal

Type the “terminal” in the search bar of the Application’s menu or use the “CTRL+ALT+T” shortcut key to launch the terminal:

Step 2: Update all the Packages

To ensure the installation of the updated version of “snapd” package, update all the packages of Debian’s repository:

$ sudo apt update

Step 3: Install the snapd on Debian 12

After the upgradation of the packages, install the package of the “snapd” on Debian 12 with the execution of the command:

$ sudo apt install snapd -y

Step 4: Enable the snapd socket

Now enable the snapd socket which allows the users to communicate with the Snapcraft store:

$ sudo systemctl enable --now snapd.socket

Step 5: Verify the Installation

When the installation is completed, confirm it by displaying the installed version of snapd with the command:

$ snap version

The snapd package has successfully been installed on Debian 12. 

How to Install the Graphical User Interface of snapd on Debian 12?

To install the GUI of the of snapd on Debian 12, run the command:

$ sudo snap install snap-store

Now go to the applications menu search bar search for the “snap-store” and launch it.

How to Manage the Snap Packages on Debian 12?

To manage the snap packages using the terminal on Debian 12, follow the below-mentioned commands. 

Search for the Snap

To search for the snap in the Snapcraft, use the “search” option. For example, search for the snap of the “VLC” with the command:

$ sudo snap find vlc

Install the Snap

After searching for the snap, use the “install” option for its installation as shown below:

$ sudo snap install vlc

Listing Down the Snaps

Use the “list” option to display the list of the installed snaps on Debian 12:

$ snap list

Update the Installed Snaps

To update all the installed snaps with the execution of a single command, run the command:

$ sudo snap refresh

Display the Information on the Snap

To display the complete information of the snap, use the “–verbose” option as shown below:

$ sudo snap info --verbose vlc

All the details of the VLC snap have been displayed on the screen. 

Display the Information on the Snap

To display the information of any particular snap, simply use the “info” option:

$ sudo snap info vlc

Disable the Auto Updates of Snap

By default, the auto-updates of the snaps are enabled. To disable the auto-updates of the particular snap, run the command:

$ sudo snap set [snap name] refresh.metered=hold

Uninstall the Snaps

To uninstall the snaps on the Debian 12, use the “remove” option of the snap package:

$ sudo snap remove vlc

The package of the “VLC” has been successfully uninstalled from Debian 12. These all are the basic commands that are used to manage the snap packages on Debian 12 in the command line interface. 

How to Uninstall snapd on Debian 12?

To uninstall and remove the snapd package on Debian 12, use the “purge” option of the apt package manager as shown:

$ sudo apt purge snapd -y

To confirm the execution of the above command, display the version of the snapd package:

$ snap version

This means that the snapd package has been successfully uninstalled from Debian 12. 

This is all about the usage of the snap packages on the Debian 12. 

Conclusion

To use the snap packages on Debian 12, install the snapd command utility with the “sudo apt install snapd -y” command in the terminal. Users can also install the Graphical User Interface of the snap store with the execution of the “sudo apt install snap-store -y” in the terminal. The basic usage of the snap packages on Debian 12 both using the terminal or GUI have been explained in this post.