Automatically delete temporary ~/Library/Application Support folders

I suggest you use a guest account on OS X if you want certain home directory files automatically erased for you. A guest account's home directory gets cleaned up when you log out.

From http://docs.info.apple.com/article.html?path=Mac/10.7/en/mh35549.html:

Important: Files created by a guest user are deleted when the user logs out. A temporary home folder is created for the guest user’s files, but this folder and its contents are deleted when the user logs out.


I know you already tried writing an Automator workflow for this, but this is probably the best way to do it. Can you post what you did for your workflow?

What I would suggest is creating an Application in Automator and use the "Run Shell Script" action. For the command, use rm ~/Library/Application\ Support/* and this will delete all files inside the Application Support folder. Now, this is going to delete ALL Application Support files...even the user's your logged into.

If you want to avoid this, you can do one of two things. The easiest would be just use the guest account of that computer like @bneely suggests.

You can also set up more than one shell script to delete only the directories that you specify. For example if you're transporting CoRD.app around with you, you could add the action rm -rf ~/Library/Application\ Support/CoRD and add another action for each application you use. It's a little tedious, but effective.

Let me know if you need further assistance setting it up.