Cleaning up my Home Directory

Take a look into the folders that bother you, to see if there is anything of value in there, and - if you're happy with losing the data - just delete them (just in case, you might choose to leave them in the trash for a few weeks).

In the future, you can instruct your package manager to remove the application as well as associated system-wide configuration files by doing a purge.

  • In synaptic, right click the package and select Mark for complete removal.
  • On the command line, if you prefer, type sudo apt-get purge packagename.

This will delete any configuration and application data that the application has created system-wide, it will - of course - leave intact all the data that you have saved from within the application (i.e. NetBeans' project directory), this includes all the user-specific configuration that is saved in your home directory. Manual deletion is the only way to get rid of those.

If you want to find out what folders take up much space, there's the Disk Usage Analyser (Applications → Accessories → Disk Usage Analyser), select the "scan home" option to get a listing of everything in home, including hidden files.

Also, use the Computer Janitor (System → Administration → Computer Janitor) to clean up any rubbish that has been left behind by the package manager. In terms of the command line, this would be equivalent to doing sudo apt-get autoremove && sudo apt-get autoclean.

Some applications, like NetBeans and AmaroK, may leave behind quite a bit of data. But there is no way for the system to automatically delete them without the risk of deleting something somebody actually wanted to keep. For the users' sake, there's no such feature; a good job considering you might have used netbeans for a few years before removing it - i'd be really annoying if apt deleted all your work to free 500 kilobytes. :-)


There's no way how to detect these unused folders reliable. A program can choose any folder name to save the user information. There's not necessarily a relation between folder name and program name.

In most cases it's not worthwhile delete this folders because most of them occupy very little space. And if you ever reinstall the program all your data is still there.

You can however manually delete folders which occupy very much space. You have to guess if the folders aren't used anymore. You may want to backup these folders first.

The space occupied by each folder can be listed with a graphical file manager or on a console with a command like this:

cd "$HOME"
du -h --max-depth 1