jump to main content
Dark Mode

Clean XCode

First of all, I apologize for the next few days of pain.

Find hot spots with

```sh sudo du -h / | sort -rh | head -20 ```

Steps to take (preferably in order):

  • Remove Caches with `rm -rf ~/Library/Caches/*`
  • Open Xcode and delete all unused Toolchains
  • Open Xcode and delete all simulators
  • Remove DerivedData with `rm -rf ~/Library/Developer/Xcode/DerivedData/*`
  • Remove Pods in iOS project `rm -rf ~/src/*`
  • Clear CocoaPods `pod cache clean –all`
  • Remove CocoaPods directory `rm -rf ~/.cocoapods`
  • Open AVD Manager and wipe data
  • Open AVD Manager and delete devices
  • Clear gradle cache with `rm -rf ~/.gradle/caches/`
  • Open SDK Manager and delete SDKs
  • Reboot to reclaim caches