Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a question about how cleanly snap packages uninstall.
I’m running Ubuntu 20.04 LTS and am trying out a lot of software (both snap packages and .deb packages), most of which I don’t intend to keep. I’m running the software that I’m trying out on a KVM virtual machine so that I can fully and cleanly get rid of installed packages without hassle.
However, with respect to the snap packages that I’m trying out, I’m wondering whether it’s necessary to install and run them under a VM to ensure that I can fully get rid of them. Since snap packages are run out of their own container, does that mean that they uninstall more cleanly than a .deb? I understand that after uninstalling a .deb package (i.e., sudo apt purge) there still may be changes to the system as compared to before the .deb was installed. Is it the case that the removal of snap packages (i.e., sudo snap remove) is more clean because snap packages are containerized? In other words, after uninstalling a snap package (that was installed directly on the machine, not on a VM), will my system be virtually identical to what it was like prior to the snap installation?
I’m primarily worried about cleanly removing apps that I don’t want to keep after trying them out. (I’m not too worried about malware because I’m only trying out software from the Ubuntu repository and from the snap store.) If I want to ensure a clean uninstall of snap packages, is there any benefit to having installed them on a VM? Or is it the case that since they’re containerized they delete fully and cleanly, meaning that it’s not necessary to use a VM to ensure clean removal?
Any thoughts or advice on this matter would be appreciated.
First of all, I'm going to assume the usage of 'apt' (terminal) instead of the Ubuntu software mangler.
Almost every application stores data under the user's $HOME directory when run as that user.
Generally speaking, everything that is un/installed with superuser privileges will not remove this data.
Additionally, dependencies might not get uninstalled after uninstalling the app in question.
always use 'apt purge ...' instead of 'apt uninstall ...' or 'apt remove ...' - read 'man apt' for an explanation (you can search for purge by entering '/purge').
always run 'apt autoremove' after uninstalling, possibly also 'apt clean' and 'apt autoclean' (again, read the man page).
Again: you still have to manually hunt down remnants under $HOME. But they're passive, not doing any harm.
_____________
Quote:
Originally Posted by sp222
I have a question about how cleanly snap packages uninstall.
I’m running Ubuntu 20.04 LTS and am trying out a lot of software (both snap packages and .deb packages), most of which I don’t intend to keep. I’m running the software that I’m trying out on a KVM virtual machine so that I can fully and cleanly get rid of installed packages without hassle.
However, with respect to the snap packages that I’m trying out, I’m wondering whether it’s necessary to install and run them under a VM to ensure that I can fully get rid of them. Since snap packages are run out of their own container, does that mean that they uninstall more cleanly than a .deb? I understand that after uninstalling a .deb package (i.e., sudo apt purge) there still may be changes to the system as compared to before the .deb was installed. Is it the case that the removal of snap packages (i.e., sudo snap remove) is more clean because snap packages are containerized? In other words, after uninstalling a snap package (that was installed directly on the machine, not on a VM), will my system be virtually identical to what it was like prior to the snap installation?
I’m primarily worried about cleanly removing apps that I don’t want to keep after trying them out. (I’m not too worried about malware because I’m only trying out software from the Ubuntu repository and from the snap store.) If I want to ensure a clean uninstall of snap packages, is there any benefit to having installed them on a VM? Or is it the case that since they’re containerized they delete fully and cleanly, meaning that it’s not necessary to use a VM to ensure clean removal?
Any thoughts or advice on this matter would be appreciated.
[...]
Unless automatic snapshots are disabled, a snapshot of all data for the snap is saved upon removal, which is then available for future restoration with snap restore. The --purge option disables automatically creating snapshots.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.