Where do applications store local settings?

Where does OS X store local settings for applications such as license keys, Skype favorite contacts, etc.

Yesterday I was troubleshooting an issue with an Apple rep and he had me delete a bunch of files and folders, one of which includes ~/library/caches/* I can't remember the rest though. Later I noticed NONE of my programs would launch because they required license keys to be input. All of my EyeTV scheduled recordings were gone. Dock preferences were reset. It's been a nightmare.

If I can get the location of these files, I can just recover them from Time Machine.


Applications store their data in any or all of the following locations:

 ~/<individual application folders>
 ~/Documents/<individual application folders>
 ~/Library/<individual application folders>
 ~/Library/Caches/*/<individual application folders>
 ~/Library/Preferences/*/<individual application folders>
 ~/Library/Application\ Support/<individual application folders>
 /Library/<individual application folders>
 /Library/Caches/*/<individual application folders>
 /Library/Preferences/*/<individual application folders>
 /Library/Application\ Support/<individual application folders>
 /private/tmp/<esoterically named folders>
 /private/var/tmp/*/<esoterically named folders>
 /private/var/db/receipts/

Also, it is not unheard of for an application to store data within its own application folder structure.


Please note that Time Machine does not backup everything. It will automatically exclude such things as iOS device backups among other items such as caches, logs, and what's in the Trash. You can view what is excluded by Time Machine automatically with this command:

 cat /System/Library/CoreServices/backupd.bundle/Contents/Resources/StdExclusions.plist