Skip to content

Instantly share code, notes, and snippets.

@surendharreddy
Forked from maciekish/resetXcode.sh
Created November 6, 2019 07:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save surendharreddy/efb1331625e6f3e1d0a5052f76c67982 to your computer and use it in GitHub Desktop.
Save surendharreddy/efb1331625e6f3e1d0a5052f76c67982 to your computer and use it in GitHub Desktop.
Reset Xcode. Clean, clear module cache, Derived Data and Xcode Caches. You can thank me later.
#!/bin/bash
killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode/*
open /Applications/Xcode.app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment