Recently I uninstalled some software using sudo apt-get --purge autoremove, thinking that this would remove all traces of it including unused dependencies and configuration files. However I discovered that a configuration file was left behind in my home folder.

Is there a more powerful command which would remove even that?

Also, is it safe to delete the hidden files and folders under home, if they are merely configuration files, or are there other kinds of files?


apt-get purge only removes system-level configuration files (e.g. those created by debconf). It doesn't touch anything in your home folder -- you have to remove those manually. That makes sense if you think about it: there might be multiple users, who probably wouldn't want administrators deleting data out of their home folders!

Applications usually store configuration data in one of the following hidden folders, which you can delete if you're sure you have no use for the data:

  • ~/.application
  • ~/.config/application
  • ~/.cache/application
  • ~/.local/share/application

Replacing "application" with the name of the package. Most applications don't store user files in those folders, and If you accidentally delete something out of your home folder that the system needs, it usually just gets re-created. Of course, it doesn't hurt to look inside before you delete them, just to make sure there's nothing you want in there.

For gnome 2 apps you might also want to run:

gconftool-2 --recursive-unset /apps/application

(again replacing "application" with the app name) which will get rid of your application preferences.

Update 12-14-2012

For gnome 3 apps, the gconftool-2 command above is replaced by:

gsettings reset-recursively [schema]

You can find the schema for the application with

gsettings list-schemas | grep application

| improve this answer | |
  • For some apps, there is also ~/.local/share/application – Panther Dec 26 '11 at 20:47

I don't know the automatic way, but you can remove manually the hidden configuration directory from your home directory.

usually the directory name is .appname in your home directory, for example, mozilla firefox has configuration folder with name .mozilla.

to show the hidden directory from nautilus, you can press CTRL + H

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy