Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 10 down vote accepted

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

share|improve this answer
    
For some apps, there is also ~/.local/share/application –  bodhi.zazen Dec 26 '11 at 20:47
    
@bodhi.zazen Thanks, added to the list. –  cscarney Jan 6 '12 at 18:55

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.