Snapcraft is a popular package management system that allows users to install software packages on Linux distributions conveniently and efficiently. However, there may be times when you need to uninstall a package that you previously installed using Snapcraft. Whether you no longer need the package, want to free up disk space, or encountered issues with the software, uninstalling a package from Snapcraft is a straightforward process.
This article will provide a detailed guide on uninstalling a package installed from Snapcraft using various methods with step-by-step commands.
The snap commands are the same for all the Linux distributions (that support snap). As an example, we will practice the commands on Ubuntu 22.04.
Method 1: Using the Snap Command-Line Interface (CLI)
The Snap command-line interface (CLI) provides a simple and efficient way to manage the snaps (the packages on Snap). The snap command lets you list, install, uninstall, and look for snap changes.
Here, we have listed the steps to remove any package installed from Snap:
Step 1: List the Snap Packages
Open the terminal and then list the installed snap packages using the command:
$ snap list
Choose the package from the above list, i.e., vlc.
Step 2: Uninstall the Package
Now, put that package name in the following command to remove it. In our case, the package is vlc:
$ sudo snap remove vlc
The successful execution of the command ensures that the package has been removed from the system. For further verification, use the command below to see the changes in Snap:
$ snap changes
The most recent change in the above image confirms that the vlc has been removed.
Method 2: Using the Snap Store (GUI)
Snapcraft packages are also available through the GUI store on your Linux distribution. As we are using Ubuntu 22.04, the GUI support of snap packages is available through the Ubuntu Software Center. Let’s see how we can use it to remove the packages:
Step 1: Open the Applications Store
Open the software center from the dock panel of Ubuntu or the Applications menu:
Step 2: Locate the Application
In the Store, click on the search icon and then type the name of the application, i.e., telegram in our case. You will get the result in the section, and the “installed” keyword will be written as shown below:
After clicking, the remove trash bin will appear. Click on it to remove the app:
Authenticate the removal process by entering the password:
The removal process will be started, and soon you will see the Install button, which assures that the application has been removed:
That’s how you can uninstall a snap using the GUI support for snap packages.
Unlike the system-dependent packages on Linux, Snap packages are independent and are supported on a wide range of Linux systems. Snap is one of the largest package repositories supported on most Linux distributions. The snap packages can be removed using the snap command or the GUI support of Snap.
For more Linux Ho-To guides, keep visiting the Linux-Genie.