Skip to content

Instantly share code, notes, and snippets.

@pwc3
Last active October 14, 2021 14:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pwc3/6648ef8437d6fe34730ba4841a3d17e1 to your computer and use it in GitHub Desktop.
Save pwc3/6648ef8437d6fe34730ba4841a3d17e1 to your computer and use it in GitHub Desktop.
Unfuck Xcode
#!/usr/bin/env bash
set -euo pipefail
echo "Exiting Xcode"
osascript -e 'quit app "Xcode"'
echo "Deleting DerivedData"
rm -rf ~/Library/Developer/Xcode/DerivedData/*
echo "Deleting llvm module cache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
echo "Relaunching Xcode"
open -a Xcode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment