Skip to content

Instantly share code, notes, and snippets.

@patrickgill
Last active July 19, 2016 08:23
Show Gist options
  • Save patrickgill/635b16291c35018e26fe29b4d3631d32 to your computer and use it in GitHub Desktop.
Save patrickgill/635b16291c35018e26fe29b4d3631d32 to your computer and use it in GitHub Desktop.
clean os x cache files
#!/bin/bash
diskutil info / | awk '/Free Space/ { print $4 $5, "free before"}'
sudo rm -rf ~/Library/Caches/*
sudo rm -rf /Library/Caches/*
sudo rm -rf /System/Library/Caches/*
diskutil info / | awk '/Free Space/ { print $4 $5, "free after"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment