After uninstalling a software on Linux

Hello,

After uninstalling a software on a Linux OS (whatever the distro), are there some files/dotfiles to be removed manually by the user (and what are their locations) ?

Can a such operation increase a bit the security/privacy of the user, notably when the deleted package may be reinstalled afterward ?

Thanks,

1 Like

Look up the “purge” command and I believe you’ll find what you’re looking for

1 Like

You may check your home folder in directories like .config or .local, for example, some apps may not remove their data completely after uninstalling them. And it happened to me personally that some apps may not remove their dependencies, something that’s kinda annoying.

Depends. If the config file contains the last window coordinates, probably not. Really depends on the contents of that file.

Usually these files are not within the package that gets installed, and are created after, usually when you first start the application and as you use the application. Thus the system package manager isn’t aware of them, and can’t remove them during uninstalls.

There are also (for Debian based OS) :

apt autoremove --purge

apt list '?obsolete'
apt remove '?obsolete'

dpkg --list | awk '/^rc/ {print $2}'
apt purge $(dpkg --list | awk '/^rc/ {print $2}')

echo $(deborphan) (deborphan package is required)
apt autoremove --purge $(deborphan)

And don’t forget to remove the sources after the uninstalls !