How to remove everything while removing a package?

While uninstalling packages only the application is removed but all the files created by that package are still there. Suppose when I uninstall and reinstall a browser it doesn’t matter. Even after uninstalling, everything from search history to settings are stored. So after reinstalling it everything is same again. This also applies to every application. Even in windows when you uninstall a program every program files will be deleted. So what command to use to completely remove a package and files like it was never installed.

You have to manually clean them up.
Usual locations are ~/.config and ~/.cache

The package manager cannot know what files the individual applications are creating…

That’s because windoze applications usually have their own installer/uninstaller. The uninstaller then has a list of folders where application specific files are stored, hence they can wipe them if desired.

I must be using a different windows then. Most of the time you will still have plenty of leftover garbage in your AppData and especially in windows registry.

For linux it is simillar - all data related to the software are removed (bin, docs) but you will still have things in /etc/, ~/.config, ~/.cache and probably /var/log. Those are there because the package manager doesn’t know about them and when you reinstall the software you do not have to configure it again from scratch.

In theory AUR PKGBUILD could be used as such installer and you can say to delete ~/.config/some_app but I would not consider it to be user friendly and/or safe. You would have to also consider you can have multiple users and some would be angry if you deleted their config files. Package manager should not delete anything from /home.


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.