Skip to content

Instantly share code, notes, and snippets.

@tjluoma
Created February 23, 2012 16:35
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjluoma/1893654 to your computer and use it in GitHub Desktop.
Save tjluoma/1893654 to your computer and use it in GitHub Desktop.
this will delete all of Safari's cookies, local storage (including website previews) and database files.
#!/bin/sh
# LogoutHooks run as root, which is why you have to
# use logname to make sure you are cleaning out the right files
cd ~`/usr/bin/logname` &&
/bin/rm -rf \
Library/Cookies/Cookies.binarycookies \
Library/Caches/com.apple.Safari/* \
Library/Safari/LocalStorage/* \
Library/Safari/Databases/*
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment