Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
-- Clear User Cache
do shell script "find ~/Library/Caches -type f -exec rm {} +"

-- Display completion message for user cache
display dialog "User Cache Cleared Successfully!" buttons {"OK"} default button "OK"

-- Clear System Cache (requires administrator password)
do shell script "sudo find /Library/Caches -type f -exec rm {} +" with administrator privileges

-- Display completion message for system cache
display dialog "System Cache Cleared Successfully!" buttons {"OK"} default button "OK"

Eliot - I took the same idea and just did it as a shell script:

Code Block
rm -rf ~/Library/Caches/*
rm -rf /Library/Caches/*