I am nervous about installing any programs I don’t intend to keep because Linux is new to me, and I have a bit of OCD (thanks to past Win/Mac virus/trojan/malware experiences). I will explain:
On Mac I found a great little app called “AppCleaner”. I have used it for years. What it does is, when you uninstall an app, it cleans up all the trash/remnants/dependencies/plist/preferences etc etc.
Basically it WIPES CLEAN all trace of the app’s files in the system folders. After some bad experiences (TeamViewer, amongst others), I spent a while finding a way to make sure when I REMOVE an app, I actually want it removed leaving no flags/markers/traces on my system. Of course Apple doesn’t make that too easy with many apps, so AppCleaner saved the day. It was a staple of mine for quite a few years.
Now… I am on Linux. I feel out of my depth somewhat, mainly due to lack of understanding of how the system files work (I learned a fair bit about Apple’s, plists etc, giving me confidence there).
So, for example, I’d like to install Evolution, just to give it a go and try importing some of my mail folders to see how (or IF) it handles it properly. On Mac, I’d do so in an instant, because I know i can remove all data associated with that app if I decide to uninstall soon after.
But I have no idea how to do that on Linux, and I dont want to start bloating my system with stuff from apps I have tried and uninstalled.
If someone could allay my fears in this regard, perhaps suggesting a similar tool/process to what AppCleaner did for me (ideally gui but CLI if I must!), I’d appreciate it. Basically an “undo any changes and wipe all data created by an app”.
Hello @joeyjonnson ,
The package manager dnf does just that, and if you use the Gnome Software package to do it, you will get prompted to delete associated data or not. I think with dnf and the commandline you need to specifically tell it to do that, but user level config and data usually is resident in the user home dir so they own it and can remove it at any time. As for libraries, they may be shared with other apps, but there is a dnf command for cleaning up unused dnf autoremove. I would first off remove the desired package, then run dnf distro-syncthen do the autoremove. All of these commands must be run as a sudoer so sudo dnf <command>. Distro-sync just makes sure your current installation of Fedora is up to date with the latest at the repos you have configured.
If you want to be on the more secure side, do tests in a virtual environment and dump it after you used/tested it.
Take in mind, that Linux is build on the idea of open and free software. There is no big companie behind it, who wants so desperate your data. If you work with applications who have same values you also not need have so much fear of it.
The apps you need to keep an eye on it are closed source software and such one who use root access to work on your machine. Even more important is from where you install it. If this are official Fedora repositories you also not have to worrier to much.
If you want to know about the paths of a application you simply can use whereis 'YOUR-APP-NAME'
As you mentioned Evolution I have as an example Thunderbird:
fist path is the binary, second the libraries/addons and third the config files in /etc
To locate the folders and files of a application in your home directory you could use:
locate ~/*thunderbird #if you add a * on the end it also shows you all the files in this folders.
/home/ilikelinux/.thunderbird
/home/ilikelinux/.cache/thunderbird
That only works for flatpak apps since they store their data in well-defined locations (~/.var/app/.../). The command-line equivalent it to use flatpak uninstall --delete-data.
It’s not possible to do that for rpm packages because they can create files anywhere in the home directory.
Thanks everyone. I was hoping for a GUI tool if possible, whilst I do intend to learn these CLI ways of doing things, for now I was wondering if there’s a way similar to “AppCleaner” on mac that ‘just does it all’ with a click! I know, I need to learn CLI, but that will take some time, especially before going into system files and deleting stuff without messing things up.
You actually raise a point which is something of an issue for me currently (confusion wise!)…
FlatPak, Flathub, RPM…
I don’t have much installed yet, Signal, Brave, Metadata Cleaner, Easy Effects, maybe one or two others. I have no idea what I used to install them (flatpak etc).
Is there a generally preferred way? (i.e. between flatpak/flathub/rpm etc)
If I have any apps installed with non-preferred way, should I uninstall and re-install via preferred method?
PS I should add, I won’t be doing this often (installing to try out and quickly uninstall).
I have one reason to do it right now - Evolution.
I am 99% sure I won’t want to keep it, but I need just 5 minutes to play with it to see if it can do what I want, I expect to be uninstalling and I don’t want to have any remnants (i.e. account folders, user data folders created on install) left over if/when I do
You should be able to test apps in Distrobox/Toolbox and remove those containers if you decide you don’t need it. Those containers will stay away from your system.
In general use Flatpak apps to isolate them from your system, its awesome and works well. For example you can remove ~/.var/app/org.APP.NAME and restart the app, all its data will be gone.
Flatpak apps need to be adapted to work inside these containers, and there are other security considerations.
I maintain a list of recommended flatpak apps:
And as nobody mentioned the “good way” to install apps:
Flatpak from flathub or fedora repos. Check flathub.org and prefer verified apps. Also check the apps security and my list
Fedora repos
3rd party flatpak repos, other distro packages using Toolbox (for example Ubuntu, Arch, Opensuse, …)
3rd party Fedora repos on the system (mostly proprietary software, avoid when possible). Only Chromium Webbrowsers are specifically recommended as native packages
Random apps, Appimages, binaries etc. This is how you get malware, be careful about download location, annoy devs to support Flatpak, verify the downloads using their gpg key and signature (the hash alone is worthless!)
Also if you want a clean system, just use an atomic variant. Its different, not harder, and before settling down you might as well start learning with the “next gen Linux desktop”. Atomic distros are really good at keeping your core system clean, if you want to be sure that rpm-ostree removed all file leftovers you can do rpm-ostree reset and your system will be exactly what Fedora ships.
But this is not needed normally, due to how RPM packages are made. As mentioned, whereis shows you where the app components are. This does not include “dotfiles” in your user directory though and the user directory is also mutable on atomic variants, which is why Flatpak is so useful.
The biggest plus is only using RPM packages for system installation, and Flatpak for graphical apps.
Everything is defined beforehand and doesnt just do the weird “I need admin privileges because I write to system directories and you need to trust me that my own uninstaller removes me” Windows-style.
This horrible Windows style makes such apps needed, but this external management is done by dnf, rpm-ostree, flatpak etc. Same on Android, no idea about Apple systems.
All of Evolution’s system files will be removed by running dnf remove evolution. That will not remove the user data under the user’s home directory. To find and remove the user data, you could use a command like find ~ -type d -name '*evolution*' (which for me shows ~/.config/evolution, ~/.cache/evolution, and ~/.local/share/evolution) and then manually delete those directories. Or, if you wanted to be really sure no user data was left under your normal account, you could create a temporary account on your system and use that to test Evolution. If you then delete the temporary user account and its home directory, you could be sure that all the user data for Evolution would be completely gone.
Thanks everyone. To be honest most replies are too complex for me (mostly the ones with terminal commands).
But some good options within my abilities above:
Second user account, that’s a great idea and well within my pay grade! I do that on my phone (Graphene) for same reason, never thought of it for laptop!
FlatSweep - Crashed when I tried to run it first time (Python 3.11 crash or similar), but second time it ran and said “no data left over” or similar. Will keep that installed for the future.
Flatpak Trash Remover (Thanks Squirrel!) - IF that one command is all. that’s needed (i don’t Get The Git ) then that’s a great bookmark now in my Fedora BMs folder
Yeah, it’s a bit of a hassle. It’d be nice if removing the package also cleaned up the user data so you didn’t have to go to such lengths if you just wanted to test a package, but apparently some people actually keep their important email stored locally and erasing all of that if the package were accidentally removed would be bad for such users. Can you believe the nerve of some people trying to keep their data on their local systems???!!! I mean, get with the program and trust the big corporations/governments you know?!
PS good point though, of course. I did like the Apple setup I had. Uninstall easy enough, but drag and drop the app (instead of deleting) onto the AppCleaner app (much like Metadata Cleaner app in Linux) and poof goes all that data (with the expected “are you sure” checkbox for dumbers like me )
You are of course doing the right thing.
Use the system and by doing so learn how to use it properly.
If you are really scared of damaging the running system that you depend upon it would be easy to create a test system in a VM where you can practice to your hearts content with all the various commands. If you break it simply reinstall and try again. This way you can learn and practice without risking the main system.
To do that on fedora you could install libvirt and virt-manager then use VMM to install / configure / operate the VM as much as you want. Break it? → then use vmm to delete the broken VM and start over.