How to free up Xcode disk space – what's safe to delete?

Updated · 4 min read

Where does Xcode use disk space?

Most of it isn't in Xcode.app itself but in ~/Library/Developer. That's where build data, device symbols, simulators and archives pile up, growing with every project and iOS version.

  • ~/Library/Developer/Xcode/DerivedData – intermediate build products and indexes.
  • ~/Library/Developer/Xcode/iOS DeviceSupport – symbols for every iOS version you've connected.
  • ~/Library/Developer/Xcode/Archives – your archived builds, including dSYM files.
  • ~/Library/Developer/CoreSimulator/Devices – simulator devices and their data.
  • ~/Library/Developer/CoreSimulator/Caches – simulator caches.

What's safe to delete?

The following data is regenerable: Xcode recreates it when needed. Quit Xcode first so no files are in use.

  • DerivedData: safe to delete entirely; your next build and indexing will just take longer.
  • iOS DeviceSupport: folders for old iOS versions you no longer test on; they're downloaded again when a device connects.
  • CoreSimulator caches: recreated as needed.
  • Unavailable simulators: xcrun simctl delete unavailable removes devices whose runtime is no longer installed.

What should you keep?

Archives contain the dSYM files for your released builds. Without them, crash reports from those versions can no longer be symbolicated – so keep at least the archives of every version still in users' hands, and delete the rest via Window › Organizer in Xcode.

Don't blindly remove simulator devices with test data you still need, or the runtimes for platforms you target. And don't delete anything in ~/Library outside the folders listed here.

How do I remove simulator runtimes?

Simulator runtimes are often several gigabytes each. Manage them in Xcode › Settings › Platforms (Preferences › Components in older Xcode versions): select a runtime and delete it with the minus button.

In Terminal, xcrun simctl runtime list shows installed runtimes. To delete individual simulator devices, use Window › Devices and Simulators in Xcode.

Which package caches grow alongside Xcode?

Package managers keep their own caches, which you can clear safely – they refill on the next download.

  • Homebrew: brew cleanup removes old versions and stale downloads.
  • CocoaPods: pod cache clean --all clears the pod cache.
  • Swift Package Manager: the cache lives in ~/Library/Caches/org.swift.swiftpm; packages are fetched again when needed.

Free up Xcode disk space safely

  1. Quit Xcode

    Quit Xcode and Simulator so no files are in use.

  2. Delete DerivedData

    In Finder, choose Go › Go to Folder, enter ~/Library/Developer/Xcode/DerivedData, and move its contents to the Trash.

  3. Remove old DeviceSupport folders

    Open ~/Library/Developer/Xcode/iOS DeviceSupport and delete folders for iOS versions you no longer test on.

  4. Delete unavailable simulators

    Run xcrun simctl delete unavailable in Terminal.

  5. Remove unused runtimes

    Under Xcode › Settings › Platforms, delete simulator runtimes you no longer need.

  6. Review your archives

    Open Window › Organizer and delete only archives for versions that are no longer in use.

  7. Clear package caches

    Run brew cleanup and pod cache clean --all if you use those tools.

Frequently asked questions

Is it safe to delete DerivedData?

Yes. Xcode recreates DerivedData on the next build; the first build and indexing will take a bit longer. Quit Xcode first so no files are in use.

What happens if I delete iOS DeviceSupport?

The next time you connect a device, Xcode downloads the matching symbols again, which can take a few minutes. So prefer deleting folders for old iOS versions you no longer use.

Can I delete ~/Library/Developer entirely?

No. It also contains archives with dSYM files, simulator devices with test data, and data from other developer tools. Delete only the regenerable folders.

How much space will this free up?

It depends heavily on how many projects, iOS versions and simulators you have. Check first with du -sh ~/Library/Developer/* or a disk map to see which folders are largest on your Mac.