TranslateProject/sources/tech/20221101.2 ⭐️ Uninstall Snap Packages from Ubuntu and Other Linux Distros.md

3.9 KiB
Raw Blame History

Uninstall Snap Packages from Ubuntu and Other Linux Distros

Installed Snap package earlier and now you want to uninstall it?

To remove a snap package, use the command in the following fashion:

sudo snap remove package_name

You need to know the exact package name here. How do you get that? Let me discuss all this in a bit more detail.

Uninstall Snap packages

You need the exact package name to remove it. The tab completion works too.

For that, list all the snap packages installed on your system:

snap list

Do you notice some entries with ✓ check marks in the screenshot below? They are verified snap packages from official developers.

Listing all the installed Snap packages

If there are too many packages, you can grep with an appropriate search term.

Once you get the package name, use it to uninstall the package.

sudo snap remove package_name

At least on the Ubuntu desktop, if you dont use sudo with snap remove, it prompts for the password graphically. But its better to use sudo because you need elevated privileges for removing snap applications anyways.

In my case, I installed Spotify on Ubuntu in snap format. Now, I remove it like this:

sudo snap remove spotify

It takes a few seconds and you should see some messages about the removal. By the end of the process, you only see the completion message.

uninstall snap package

And thats how you remove applications installed in snap format.

But what about removing snap entirely? Not the snap applications but the snap daemon itself.

Remove Snap entirely (not for Ubuntu)

WARNING! Please do not remove snapd and other core snap stuff from Ubuntu. Snap is an integral part of Ubuntu and removing them could have adverse consequences.

For non-Ubuntu distributions, where you manually installed Snap support, removing snapd should not create any problems.

First, make sure that you dont have any snap packages installed.

snap list

If there are any, remove those snap packages first.

sudo snap remove package1 package2 package3

On Debian, Linux Mint, elementary OS etc, use the apt command to remove snapd:

sudo apt remove --purge snapd

On Fedora-based distributions, use the DNF command:

sudo dnf remove snapd

Later on, you can remove the snap folder from your home directory and /var/cache/snapd if you are particular about that.

Conclusion

This was a quick tutorial for showing the steps for uninstalling snap applications.

Some people have a strong aversion to Snap because of its “close” nature. Personally, I dont have any special liking or dislike for it. I prefer using apt but when I dont get the required package or version, I go for other formats like Snap, Flatpak and AppImage.

As I mentioned earlier, please dont remove snap daemon from Ubuntu. It may leave you with a broken system and neither of us wants that.


via: https://itsfoss.com/remove-snap/

作者:Abhishek Prakash 选题:lkxed 译者:译者ID 校对:校对者ID

本文由 LCTT 原创编译,Linux中国 荣誉推出