Xcode itself takes about 10 GB in /Applications. What it writes next to your home folder is often five times that. Every project you open leaves build products, every iOS version you plug in leaves debug symbols, and every simulator keeps its own copy of the apps you installed on it. Done with Xcode altogether? See how to uninstall Xcode and the Command Line Tools cleanly.
Almost all of it lives in ~/Library/Developer. Look there first:
du -sh ~/Library/Developer/* ~/Library/Developer/Xcode/* 2>/dev/null | sort -h
Then go through the folders below. Quit Xcode and the Simulator before you delete anything, so nothing is written while you clean. The Terminal does not need Full Disk Access for these folders.
DerivedData
~/Library/Developer/Xcode/DerivedData holds the build products, indexes and logs of every project you opened, one folder per project, plus shared caches such as ModuleCache.noindex. It is the safest big folder on the Mac: Xcode rebuilds it, and you wait for one full build and one re-index.
du -sh ~/Library/Developer/Xcode/DerivedData/* | sort -h
rm -rf ~/Library/Developer/Xcode/DerivedData/<Project-hash> # one project
rm -rf ~/Library/Developer/Xcode/DerivedData # everything
Delete the folders of projects you no longer work on first; they never shrink on their own.
Simulator data and test device clones
Each simulator has a folder in ~/Library/Developer/CoreSimulator/Devices, named by its UDID, with every app you installed and the data they wrote. A simulator you used for a year can hold several GB. Match the folders to names:
xcrun simctl list devices
du -sh ~/Library/Developer/CoreSimulator/Devices/* | sort -h | tail
Erasing a simulator resets it to a fresh device: its apps and data are gone, the simulator stays in Xcode’s list.
xcrun simctl shutdown <UDID>
xcrun simctl erase <UDID>
xcrun simctl delete unavailable # remove simulators whose runtime is gone
When Xcode runs tests in parallel, it clones simulators into ~/Library/Developer/XCTestDevices. These clones stay after the run. You can delete the folder’s contents with Xcode closed; the next parallel test run makes new ones.
du -sh ~/Library/Developer/XCTestDevices
rm -rf ~/Library/Developer/XCTestDevices/*
SwiftUI Previews keep their own simulators in ~/Library/Developer/Xcode/UserData/Previews, and ~/Library/Developer/CoreSimulator/Caches holds caches the Simulator rebuilds. Both are safe to delete with Xcode closed.
Old simulator runtimes
Since Xcode 14, simulator runtimes are downloaded separately and each is 5 to 8 GB. Updating Xcode adds a new one but keeps the old ones.
xcrun simctl runtime list
xcrun simctl runtime delete <runtime identifier>
Keep the runtimes of the oldest iOS version your app supports if you test on it. A deleted runtime can be downloaded again from Xcode › Settings › Components.
Archives
~/Library/Developer/Xcode/Archives has one .xcarchive per build you archived for TestFlight or the App Store. Unlike the rest, these are not caches: an archive holds the dSYM files you need to read the crash reports of that build. Keep the archives of every version still in users’ hands (unless your crash reporter already has the dSYMs), and remove old ones from Window › Organizer › Archives, or move them to the Trash in Finder so you can change your mind.
ls -lt ~/Library/Developer/Xcode/Archives
iOS DeviceSupport
The first time you connect an iPhone or iPad running a new version, Xcode copies its debug symbols to ~/Library/Developer/Xcode/iOS DeviceSupport: one folder per version, 2 to 5 GB each. watchOS DeviceSupport and tvOS DeviceSupport work the same way.
du -sh ~/Library/Developer/Xcode/*DeviceSupport/* | sort -h
rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/<version folder>
Remove the versions no device of yours runs any more. If you connect such a device again, Xcode copies the symbols again, which takes a few minutes.
Documentation cache, device logs and CocoaPods
Three smaller folders that add up:
~/Library/Developer/Xcode/DocumentationCache: downloaded documentation; Xcode downloads it again.~/Library/Developer/Xcode/iOS Device Logs(and thewatchOSandtvOSones): logs copied from your devices, often useless once read.~/.cocoapods/repos: if you used CocoaPods before version 1.8, a full git clone of the spec repo namedmastermay still sit there, several GB. Projects now use thetrunkCDN index instead.
pod repo list
pod repo remove master
pod cache clean --all # downloaded pods; the next pod install fetches them
How CleanMate does it
CleanMate puts every item above in the developer junk of Smart Scan (all macOS features), each with its size, and nothing is removed until you confirm:
- DerivedData: each project on its own line, with its workspace path and last use; shared caches marked “shared by all projects”. Skipped while Xcode or
xcodebuildruns. - Simulator data: one line per available simulator with its name, OS and last use, not ticked. It runs
simctl erase, so the simulator stays, empty as new. A running simulator is locked, and CleanMate never deletes a simulator. - Test device clones: one line per clone in
XCTestDevices, not ticked. Both simulator items are skipped while Xcode, Simulator orxcodebuildruns. - SwiftUI Previews simulators and simulator caches.
- Old simulator runtimes: only a runtime that a newer installed runtime of the same platform replaces and that was not used for 30 days, not ticked, removed with
simctl runtime delete. - Archives older than 90 days, each on its own line, moved to the Trash.
- Device support, one OS version per line, such as “iOS 18.1 (22B83)”.
- Xcode documentation cache, Xcode device logs and CocoaPods spec repo clones (each git clone in
~/.cocoapods/repos, never thetrunkindex), all not ticked.
For the rest of the developer junk on a Mac, read Free up disk space on a Mac as a developer; for containers, Docker using too much disk space.
For mobile projects, see Flutter, React Native and the iOS Simulator filling your Mac.

