Developer Files

How to delete Xcode DerivedData, old simulators and device support

If you’ve installed Xcode, even once, it’s probably one of the biggest things on your Mac. Not the app itself, but what it leaves behind: build data for every project you’ve opened, simulators for every iOS version, and support files for every device you’ve plugged in. On a busy developer’s Mac that’s easily 50 GB or more.

Almost all of it can be cleared safely. Here’s what each folder is, how big it tends to get, and what to keep.

See how much Xcode is using

Everything below lives in ~/Library/Developer. To see what’s big, open Terminal and run:

Terminal
du -sh ~/Library/Developer/* ~/Library/Developer/Xcode/* 2>/dev/null | sort -h

The biggest folders are at the bottom. Usually it’s DerivedData, CoreSimulator and iOS DeviceSupport, in some order.

First, quit Xcode

Quit Xcode and the Simulator app before you start, so nothing is writing to these folders while you clear them.

Delete DerivedData

DerivedData is where Xcode keeps build results, indexes and logs for every project you’ve opened, including ones you deleted years ago. It’s often the single biggest folder.

To find it, open Xcode’s Settings → Locations and click the arrow next to the Derived Data path, or go straight to:

~/Library/Developer/Xcode/DerivedData

Everything inside rebuilds the next time you build, so it’s safe to delete. To clear it all from Terminal:

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

Your first build of each project afterwards takes longer, and Xcode re-indexes, so autocomplete is slow for a few minutes. Deleting DerivedData is also the classic fix when Xcode shows errors that make no sense.

Remove simulators you can’t use any more

Simulators and their data live in ~/Library/Developer/CoreSimulator. Each one keeps its own copy of the apps you installed on it, which adds up.

This removes simulators whose iOS runtime is no longer installed, so they can’t run anyway:

Terminal
xcrun simctl delete unavailable

To see every simulator and which ones you could remove by hand:

Terminal
xcrun simctl list devices

You can also open Window → Devices and Simulators in Xcode and delete simulators you don’t use.

Remove old simulator runtimes

Each iOS, watchOS, tvOS and visionOS runtime is several gigabytes. In Xcode, open Settings → Components (called Platforms in older versions) to see which are installed and delete the ones you no longer build for. In Terminal, xcrun simctl runtime list shows them too.

Clear old device support

Each iOS version you’ve connected a real device with leaves a folder in:

~/Library/Developer/Xcode/iOS DeviceSupport

These can be 2–5 GB each. Keep the folder for the iOS version on the iPhone you use now; the rest are recreated automatically if you plug in an older device again. The same goes for watchOS DeviceSupport.

Old archives

Archives in ~/Library/Developer/Xcode/Archives are the builds you exported or sent to the App Store. They’re not rebuilt automatically, and you need them to read crash reports for those versions. Keep archives for versions people still use; older ones can go. In Xcode, Window → Organizer lists them by app and date.

Package caches

Swift packages and CocoaPods keep their own caches:

  • Swift Package Manager: ~/Library/Caches/org.swift.swiftpm
  • CocoaPods: ~/Library/Caches/CocoaPods (or run pod cache clean --all)

Both are downloaded again when a project needs them.

What not to delete

  • Your projects, wherever they live.
  • Archives for versions you still support.
  • Xcode itself and /Applications/Xcode.app, unless you’re uninstalling it.
  • Anything outside ~/Library/Developer that you don’t recognise.
  • Provisioning profiles and keychains: signing breaks without them.

Keep it from piling up

Clear DerivedData every month or two, delete simulators and runtimes when a new Xcode arrives, and remove device support for iOS versions you no longer test on. If you also use Docker, see how to delete Docker images on a Mac.

Developer Files results: 7.19 GB found from 7 tools on this Mac
Developer Files

Or let Tinymop find it

Developer Files looks in Xcode, simulators, device support and package caches, shows every folder with its size, and only ticks what rebuilds itself. Xcode archives and simulator data are only offered once they’re over 30 days old, and you decide whether they go.

Download for Mac
Clean build ✓DerivedData5.01 GB
cleared