LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 01-27-2021, 05:07 PM   #1
sp222
LQ Newbie
 
Registered: Jan 2021
Posts: 1

Rep: Reputation: Disabled
how cleanly do snap packages uninstall?


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.
 
Old 01-28-2021, 01:52 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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 View Post
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.
 
Old 01-28-2021, 02:07 AM   #3
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
From the snap manpage:
Quote:
remove
[...]
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Enable Snap And Install Snap Packages On Linux Mint 20? LXer Syndicated Linux News 1 06-13-2020 05:09 PM
LXer: Ubuntu Snap Packages: The Good, the Bad, the Ugly LXer Syndicated Linux News 0 04-26-2016 08:51 AM
LXer: LXD, Snap Packages and Cloud Storage Headline Ubuntu Linux 16.04 LTS LXer Syndicated Linux News 0 04-21-2016 04:50 AM
could not uninstall Nvidia driver cleanly kevinbenko Linux - Software 2 02-24-2014 10:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration