Bundle$29.99/yr

BroomDisk space analyzer and cleanerDrippyNetwork usage in your menu barBuckyDownload manager

More apps

Batch File RenamerRename hundreds of files at onceCapzAnimated captions for any videoTorrieFree, open source torrent client

Clear Xcode DerivedData and simulators

Xcode is one of the biggest space users on a developer's Mac. Most of it is rebuildable. Here's what each folder is and how to clear it safely.

Where Xcode's space goes

  • DerivedData (~/Library/Developer/Xcode/DerivedData): build products and indexes. Safe to delete; Xcode rebuilds on the next build.
  • Archives (~/Library/Developer/Xcode/Archives): builds you archived for release. Keep the ones whose dSYMs you still need for crash logs.
  • iOS DeviceSupport: debug symbols for every iOS version you've plugged a device in with. Old versions are safe to delete.
  • CoreSimulator (~/Library/Developer/CoreSimulator): simulator devices and runtimes, often tens of GB.

With Terminal

rm -rf ~/Library/Developer/Xcode/DerivedData clears build data, and xcrun simctl delete unavailable removes simulators for runtimes you no longer have. Both are permanent: there's no Trash.

With Broom

Broom's Cleanup screen lists DerivedData, archives and device support with their sizes. DerivedData is selected for you because it's rebuildable. Simulators and old SDKs sit under Worth a look so you choose. Everything moves to the Trash, so you can undo a wrong guess.

It also catches the rest of a developer Mac: package manager caches, and build folders like node_modules, target, Pods and .build.

Questions

Is it safe to delete DerivedData?

Yes. Close Xcode first. The next build takes longer while Xcode rebuilds it.

Why is CoreSimulator so big?

Each simulator runtime is several GB, and each device keeps its own installed apps and data. Old runtimes pile up across Xcode updates.

Should I delete Xcode Archives?

Only ones you don't need. Archives hold the dSYM files used to symbolicate crash reports for that release.

Download Broom

Download for macOS