Skip to content

Instantly share code, notes, and snippets.

@asmallteapot
Created March 27, 2018 18:29
Show Gist options
  • Save asmallteapot/75d5201894d200ee5376d43412236c9f to your computer and use it in GitHub Desktop.
Save asmallteapot/75d5201894d200ee5376d43412236c9f to your computer and use it in GitHub Desktop.
Shell script for removing Xcode derived data
# remove Xcode build cache
function xcode-unfuck-deriveddata() {
XCODE_DERIVED_DATA_DIR=`defaults read com.apple.dt.xcode.IDECustomDerivedDataLocation 2>&1 >/dev/null`
if [[ -e $XCODE_DERIVED_DIR ]]; then;
XCODE_DERIVED_DATA_DIR=~/Library/Developer/Xcode/DerivedData
fi
rm -rf $XCODE_DERIVED_DATA_DIR
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment