Is there a way to completely remove ALL traces of a program in Linux?

I've researched a lot on this, and I've seen people talk about apt-get remove packagename, apt-get purge packagename, apt-get remove --purge packagename, and apt-get autoremove, but it sounds like all of these leave configuration files or other traces of some sort.

I want to remove EVERYTHING, though. I'm talking uninstall and completely remove the program, the package, all dependencies, all configuration files, and all data files. Remove everything associated with the program, leaving the system like the program was never installed and never existed.

I'm looking to switch to Linux as my main OS (from Windows), but for me to sleep soundly at night, I need to know that when I uninstall something, everything associated with that thing is gone. I know it's weird. But you know, we all have our needs.

Please help me out here; I could even pick a distro based on this, if I had to.

Thanks, and have a wonderful day!

  • This question doesn't belong in the elementary OS SE site, as it is a generic Linux question and not specific to elementary OS. It would be better asked in the Linux & Unix Stack Exchange — and indeed, an exact copy was posted there (and yet another one in SuperUser!). I am therefore voting to close this as off-topic and a duplicate.
    – waldyrious
    Aug 9, 2021 at 19:29

2 Answers 2


insurance! (There may be alternatives, that you do not need to install) sudo apt install tree for more information, info tree

and then you launch the aforementioned command. lucky.


I read your question with interest, it is quite logical that I do not let you sleep, I think I can offer you a solution. After doing everything you describe, you could manually search your system for all traces of the program, you know. For that, install "tree" and do the following tree | grep "program" with that you will ask for a complete list of all files, folders, etc. (It is important to do it from the root of the system) and with grep you will filter whatever you are looking for from that list. Greetings and follow the white rabbit. ;)