OctoMac

Why Xcode takes up so much space

Short answer:Xcode accumulates build data (DerivedData), simulators and project archives. DerivedData regenerates when you build; simulators and archives need more care. OctoMac detects development folders only inside the ones you add.

Reviewed on · Published by ZILLION TECHNOLOGY SOLUTIONS S.L.U.

DerivedData

It holds indexes and build products. It regenerates when you build, at the cost of time. The usual path is ~/Library/Developer/Xcode/DerivedData. From Xcode, in Settings, Locations, you can open it with the arrow next to its path.

Simulators

They take space in ~/Library/Developer/CoreSimulator. Do not delete that folder by hand: you can leave simulators in a bad state. To remove those that use a runtime that is no longer installed, there is the command xcrun simctl delete unavailable, which Apple describes in its WWDC19 session on the simulator.

Archives and other data

Build archives (Archives) may be the only thing that keeps the symbols of a released version. Do not delete them without checking.

What OctoMac does

  • It looks for folders named DerivedData, node_modules, .build, Pods and similar inside the development folders you add, and leaves them unselected.
  • It does not look in ~/Library/Developer by itself. If you want it to review DerivedData, add that folder as a development folder.
  • It does not manage simulators.

Before deleting

  • Quit Xcode.
  • Think about the cost: rebuilding a large project can take a while.
  • Moving to the Trash does not free space until you empty it.

Sources

Try the demo with sample data