How to "Delete derived data" in Xcode?

Update again: in Xcode 12 go to Preferences -> Locations tab -> click the arrow by the DerivedData path to open it in Finder -> move DerivedData to the trash (Xcode will rebuild it)


exit xcode

In the Terminal application (I'm sure you have it open at all times ;^) type:

rm -rf ~/Library/Developer/Xcode/DerivedData

If xcode does not cooperate when you asked it politely to exit from file menu or via Command-Q shortcut due to some incessant popup craving for your attention in a pile of windows in a long forgotten space you could brute force the xcode eviction like so

killall Xcode; rm -rf ~/Library/Developer/Xcode/DerivedData

Caveat: if you won't exit the xcode first you'd get lingering files (courtesy of HFS I suppose) and you'd have to use the Sheamus'es script. Feel free to share your experience with the newer (no longer experimental) macos fs in the comments below.

bash tip of the day: tab performs filename completion as you type paths

Tip of the year: consider procuring O'Reilly bash book[s] to save your time further. Disclaimer: I do not work for O'Reilly, never did. Just a happy customer.

Though in my recent experience with Xcode 10.2.1 Windows(Cmd)+Shift+k shortcut works just fine.