Use Terminal to empty cache
My Safari cache won't empty. What is the Terminal command to do so?
MacBook, OS X Mavericks (10.9.1)
My Safari cache won't empty. What is the Terminal command to do so?
MacBook, OS X Mavericks (10.9.1)
I don't know the terminal command for emptying the Safari caches.
But you can try this.
Quit Safari if open.
Option click the "Go" menu in the Finder menu bar.
Select "Library" and then "Caches".
Look for the folder 'com.apple.Safari"
Right click "com.apple.Safari" and select "Move to Trash"
Relaunch Safari.
You can delete Safari's cache file. First, check its size using the disk usage (du) command:
du -h /Users/$HOME/Library/Caches/com.apple.Safari/Cache.db
Note: Replace "$HOME" with the name of your home folder. You can use the user identity (id) command to find it:
id -un
Next, delete Safari's cache file:
rm /Users/$HOME/Library/Caches/com.apple.Safari/Cache.db
Safari will create a new Cache.db file automatically when you open a new webpage. Open a new webpage or restart Safari and recheck disk usage:
du -h /Users/$HOME/Library/Caches/com.apple.Safari/Cache.db
Warning: when you use the remove (rm)command files are essentially unrecoverable. A more prudent approach is to use the move (mv) command:
mv /Users/$HOME/Library/Caches/com.apple.Safari/Cache.db ~/.Trash/
This will move the file to your user's ($HOME) trash. From there it is still recoverable until you empty the trash.
Use Terminal to empty cache