If you build iOS or Mac apps, Xcode is probably the single biggest user of your disk after your photos. I have seen machines where Xcode related folders added up to more than 100 GB, and most of it was stuff the developer had forgotten about.
Here is where it hides and what you can safely remove.
DerivedData
Location: ~/Library/Developer/Xcode/DerivedData
Every project you build gets a folder here with build products and indexes, plus intermediate files. Old projects keep their folders forever. Deleting DerivedData is safe. Xcode rebuilds what it needs the next time you open a project, and the first build will just take longer.
To remove it: quit Xcode, open the folder in Finder, and trash the contents. Or in Terminal:
rm -rf ~/Library/Developer/Xcode/DerivedData/*
Simulator runtimes and devices
Simulator runtimes for old iOS versions can be large. Recent Xcode versions let you manage them in Settings, under Platforms (called Components in some versions). Remove the runtimes you no longer test against.
Simulator devices that point to runtimes you removed can be cleaned up with:
xcrun simctl delete unavailable
Archives
Location: ~/Library/Developer/Xcode/Archives
Each time you archive a build for TestFlight or the App Store, a copy lands here. Keep the archives for versions you might need to symbolicate crash logs for. Old ones from apps you shipped years ago can go. You can also manage them in Xcode's Organizer window.
iOS DeviceSupport
Location: ~/Library/Developer/Xcode/iOS DeviceSupport
Every time you connect a phone on a new iOS version, Xcode copies debug symbols here. Folders for iOS versions you no longer have on any device are safe to delete.
Seeing it all at once
Hunting through these folders by hand works, but it is tedious. A disk space analyzer for Mac shows the whole ~/Library/Developer tree as a map, so you see which part is the big one before you start.
I use DissectMac for this. It has a filter for Xcode data so you can pull up DerivedData, archives and simulator files together and send what you pick to the Trash. It also has filters for Docker images and node_modules, which matters if you do web or backend work on the same Mac.
Other developer folders worth checking
- Docker. The disk image can grow very large. See Docker.raw is huge on my Mac.
- node_modules. Copies spread across every old JavaScript project. See deleting old node_modules folders.
- Homebrew. Run brew cleanup to remove old versions and its download cache.
- Local AI models. If you have been trying out Ollama or LM Studio, check local AI models eating Mac storage.
How often to do this
Once every couple of months is plenty for most developers. If you switch between many projects, DerivedData grows fastest, so clear that one more often. For the general, non developer side of things, there is my how to clean my Mac checklist.

Top comments (0)