Skip to content

Instantly share code, notes, and snippets.

Last active Oct 14, 2021
What would you like to do?
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