Automatic way to delete caches

Hei guys,


While discussing some problem with Apple Tech Support, that guy told me that it's a good idea to clear the caches once a month.

The caches that need to be cleaned are

Finder - MacBookPro - Users - [username] - Library - caches (delete all), cookies (delete all), saved application state (delete all)

Finder - go - computer - MacBookpro - library - caches (delete all)

Empty trash after deleting all these files.

Is any automatic way available to do this? Automator or AppleScript or a Terminal command etc.

I tried Automator. But, the process failed as the admin password is required to delete those files and I couldn't insert the password entry related "Actions".

In Terminal, I could find commands to delete the entire folder. So, if I use this here, the "Caches" folder itself will be deleted whereas, my aim is to delete the folder contents.

Regards,

Babloo

MacBook Pro, Mac OS X (10.7.5)

Posted on Mar 4, 2017 6:59 PM

Reply
4 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Automatic way to delete caches

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.