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

118 lines
3.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[#]: subject: "Uninstall Snap Packages from Ubuntu and Other Linux Distros"
[#]: via: "https://itsfoss.com/remove-snap/"
[#]: author: "Abhishek Prakash https://itsfoss.com/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
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][1].
![Listing all the installed Snap packages][2]
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][3]
And thats how you remove applications installed in snap format.
But what about removing snap entirely? Not the snap applications but the snap [daemon][4] 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][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/
[b]: https://github.com/lkxed
[1]: https://forum.snapcraft.io/t/verified-developers/2005
[2]: https://itsfoss.com/wp-content/uploads/2022/11/list-installedsnap-packages.png
[3]: https://itsfoss.com/wp-content/uploads/2022/11/uninstall-snap-package.png
[4]: https://itsfoss.com/linux-daemons/