How to "Delete derived data" in Xcode?

In Xcode5 there is simple option to Delete derived data:

In organiser menu (cmd + shift + 2):

enter image description here

But with new interface of Xcode6 there is no similar options.

Is there any quick methods to delete this trough Xcode6 interface?

Or now I should remove this folders in system manually?


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 (cutesy 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.


Pressing Cmd + Shift + 2 In Xcode 6 will present Devices, which is separated from Organizer. Instead you can go Window, then Organizer, then find your project in Projects to delete derived data. You may set a short key in Key Bindings for quick access to derived data.

enter image description here


At Xcode 7.2.1 you can now the following:

⌘⌥⇧K

Which is Command + Option + Shift + K

Alternatively you can select Product > (Hold Key) and select Clean Build Folder...

Edit: I also like to create an alias for one of @anton-tropashko's suggested shell commands:

alias nuke-dd='rm -rv ~/Library/Developer/Xcode/DerivedData'

Add this ^^ to your ~/.bash_profile or somewhere else that is sourced for each shell you start, then just type:

$ nuke-dd

The approach I'm using is to install the watchdog app (https://www.cerebralgardens.com/watchdog).

This app will automatically clear your derived data based on your preferences (e.g. when data exceeds a certain size, when xcode closes, daily at a certain time, manually or when a clean is detected).

EDIT:

For those who don't want to spend money, in Xcode 7 select the Windows menu and Project. You can then select your project and delete its derived data (see screenshot below). Note that if there is a blue dot next to your project it indicates that it is open. It is better to close your project before deleting the derived data.

Delete derived data