Why does 'apt-get remove' leave configuration files in /etc? [duplicate]

I can understand keeping configuration files in /home, since these are custom files that have been created/edited by the user when running the corresponding program.

In contrast however, configuration files in /etc must be created and edited as root, and given that most programs do not run as root, they must be created when their corresponding program is installed, and not be edited thereafter. This means they won't differ from their counterparts in the program's package file.

So what is the point in keeping them after the program has been removed?


A "configuration file", in /etc, is a System Administrator controlled file, and could contain a significant amount of System Administrator effort. It's created by the package installation scripts, but customized locally. Uninstalling a package should not discard local changes. Consider the case where one wants to uninstall a package, then, build the absolute latest version from source. One would not want to lose the old version's configuration file.

To really get rid of everything, configuration files in /etc too, use apt purge package. Read man apt.