Why Xcode takes up so much space, and what you can clear
By Chris WilliamsUpdated 5 min read
Short answer: The Xcode app is only part of it. Most of the space is simulator runtimes and the ~/Library/Developer folder: build data, simulators, device support files, archives and caches. Remove runtimes you don't use in Xcode > Settings > Components, clear DerivedData and old device support files, and keep archives of builds you shipped.
On this page
Where Xcode's space actually goes
When Storage settings or a disk map says Xcode is big, the app in /Applications is usually the smaller part. Xcode writes data to several places, and most of them grow every time you build, run a simulator or connect a device.
| What | Where | Comes back on its own? |
|---|---|---|
| The Xcode app | /Applications/ | It's the app |
| Simulator runtimes (iOS, watchOS, tvOS, visionOS) | /Library/ and /System/ | Only if you download them again |
| Build data, one folder per project | ~/Library/ | Yes, when you build |
| Simulators, with the apps and data on them | ~/Library/ | Default ones are recreated, your data isn't |
| Device support files | ~/Library/ and the other platforms' folders | Yes, when you connect a device running that version |
| Archives | ~/Library/ | No |
| Caches | ~/Library/, ~/Library/ | Yes, quickly |
| SwiftUI preview data | ~/Library/ | Yes, when you open a preview |
Runtimes aren't in your home folder. They're disk images macOS mounts for the simulators, so they don't show up where you'd look first.
Why Xcode itself is so big
The app bundle includes compilers, debuggers, Instruments, documentation tools and the SDKs for every Apple platform it builds for. Apple has moved some of the heaviest parts out of the download: platform support and simulator runtimes are optional components you install separately, so you can "install only the components you use and remove the ones you don't" (Apple Developer Documentation).
That's the first thing to check if you only build for one platform. If you develop only for iOS, the watchOS, tvOS and visionOS components don't need to be installed.
More than one Xcode is the other common surprise. Each copy in /Applications, such as Xcode.app and Xcode-beta.app, is a full install. To see which one your command-line tools use:
xcode-select -p
If you no longer need a beta or an older release, quit it and move it to the Trash like any other app. Your projects, simulators and DerivedData are shared between versions, so they stay.
Measure before you clear anything
Start with the totals. In Finder, choose , type ~/Library/ and press Return. Select a folder and choose File > Get Info (⌘I) to see its size. That works for one folder at a time. For everything at once, use Terminal:
du -sh /Applications/Xcode.app ~/Library/Developer
Then see which part of ~/Library/ is biggest, largest last:
du -sh ~/Library/Developer/* ~/Library/Developer/Xcode/* 2>/dev/null | sort -h
For runtimes, ask the simulator tool rather than measuring folders:
xcrun simctl runtime list
It lists each installed runtime with its identifier. Recent versions print the total size at the end.
Two places in the interface help too. shows installed components "along with the amount of storage you can recover if you remove them," in Apple's words (Apple Developer Documentation). And with Xcode installed, may show a Developer category for some of Xcode's build and device support files (Eclectic Light). Apple's user guide doesn't describe that category or say whether removing items there uses the Trash, so treat it as permanent.
Clear Xcode's space, step by step
These steps start with the largest, safest wins and end with the ones that need judgment.
Remove simulator runtimes you don't use
In Xcode, choose Xcode > Settings, click Components, click the Info button next to a runtime you no longer test on, and click Delete.
Delete unavailable simulators
In Terminal, run xcrun simctl delete unavailable. It removes simulators whose runtime is no longer installed.
Clear DerivedData
Quit Xcode. In Finder, choose Go > Go to Folder, open ~/Library/Developer/Xcode/DerivedData and move the project folders inside it to the Trash.
Remove old device support files
Open ~/Library/Developer/Xcode/iOS DeviceSupport and move folders for OS versions you no longer debug to the Trash.
Review your archives
Choose Window > Organizer, click Archives, and remove archives you'll never need. Keep the ones for builds you shipped.
Empty the Trash
Build a project to check everything works, then empty the Trash to get the space back.
Apple's developer support recommends the Components settings or xcrun simctl runtime delete for runtimes, and advises against using Disk Utility to manage them (Apple Developer Forums). Runtimes and simulators have their own guide: how to delete iOS simulators and runtimes. DerivedData has one too: how to delete Xcode DerivedData.
Xcode caches: are they safe to delete?
Yes. The cache folder in ~/Library/ holds temporary files Xcode keeps so it doesn't have to make them again. Quit Xcode and move it to the Trash if you like, but don't expect the space to stay free.
~/Library/Caches/com.apple.dt.Xcode
Xcode's cache
- Made by
- Xcode
- What it is
- Temporary files Xcode keeps so it doesn't have to rebuild them each time.
- Does it come back?
- Comes back on its own
- Without it
- Xcode rebuilds it as you work. Your projects aren't affected.
That's true of most Xcode "caches". DerivedData, simulator caches and preview data are all rebuilt the moment you work on a project again. Clearing them helps most for projects you've stopped opening, and when a build or preview is stuck.
Device support files
When you connect an iPhone, iPad, Apple Watch, Apple TV or Vision Pro to debug on it, Xcode copies that OS version's debug symbols to your Mac. You get one folder per version, and they add up if you've tested on many releases over the years.
~/Library/Developer/Xcode/iOS DeviceSupport
Device support files
- Made by
- Xcode
- What it is
- Debug symbols Xcode copied from devices you connected, one folder per OS version.
- Does it come back?
- Comes back when it's needed
- Without it
- Xcode copies them again the next time you connect a device running that version.
Folders for OS versions your devices no longer run are safe to move to the Trash. If you later connect a device with that version, Xcode copies the symbols again, which takes a few minutes.
Archives
Archives are different. Each one is a build you made with Product > Archive, "including debugging information," as Apple puts it (Apple Developer Documentation). Those debug symbols are what turn a crash report from a shipped version into readable function names.
~/Library/Developer/Xcode/Archives
Xcode archives
- Made by
- Xcode
- What it is
- Builds you archived to ship or share, with the debug symbols needed to read their crash reports.
- Does it come back?
- Doesn't come back
- Without it
- These builds couldn't be recreated exactly, and crash reports from those versions would be harder to read.
- How to manage it
- Xcode → Window → Organizer
Manage them in under Archives. Archives of test builds you never distributed are fine to remove. Keep archives of every version still in your users' hands, unless you've uploaded their symbols somewhere else.
What's safe to remove, and what isn't
Safe, because Xcode makes them again:
- DerivedData project folders
~/Library/Caches/ com.apple.dt.Xcode - Simulator caches and SwiftUI preview data
- Device support folders for OS versions you no longer debug
- Simulators whose runtime is gone (
xcrun simctl delete unavailable)
Needs a decision:
- Simulator runtimes. Removing one is safe, but you'll download it again to test on that version.
- Simulators you created. Deleting one removes the apps and data on it.
- Archives. Keep the ones for shipped builds.
Leave alone:
~/Library/, which holds your key bindings, code snippets and themesDeveloper/ Xcode/ UserData - The runtime disk images in
/Library/andDeveloper/ CoreSimulator /System/. Remove runtimes through Xcode orLibrary/ AssetsV2 simctl, not Finder or Disk Utility.
If you only need git, clang and other command-line tools, you may not need Xcode at all. Apple's Command Line Tools package installs them into /Library/ without the full app (Apple Developer Documentation).
How MacClearings shows Xcode's space
MacClearings starts by showing where the space is, in plain words. The Map draws your home folder as a sunburst or treemap. Click ~/Library/ and the inspector says what each folder is, which app made it and whether it comes back, from the same field guide quoted above.

Breakdown, the "why is my disk full" page, lists Xcode's build data, simulators, device support files and archives as separate lines under your Library. It also lists each simulator runtime with its size and when it was last used, and points you to Xcode's Components settings to remove it. MacClearings reads that list with xcrun simctl runtime list and never changes runtimes itself.
When you want to make room, Suggestions has an Xcode group. DerivedData, unavailable simulators and simulator caches are checked for you. Device support files are checked once they've gone six months untouched. Archives older than 90 days are listed but never checked, for the crash-report reason above.
Suggestions rule · Xcode
Device support files
Debug symbols Xcode copies from devices you've connected. Xcode copies them again when you connect a device running that version. Ones untouched for six months are checked.
- ~/Library/Developer/Xcode/iOS DeviceSupport/*
- ~/Library/Developer/Xcode/watchOS DeviceSupport/*
- ~/Library/Developer/Xcode/tvOS DeviceSupport/*
- ~/Library/Developer/Xcode/visionOS DeviceSupport/*
Listed, but you decide whether to check it.
Nothing moves until you review the list and click Move to Trash. Every cleanup can be undone from History, and MacClearings never empties the Trash, so the space comes back when you empty it. The developer page lists every Xcode rule with its paths.
Questions
Why is Xcode taking up so much space?
The app itself is large, but most of the growth happens elsewhere: build data for every project you've built, a simulator for each device and OS version you've run, simulator runtimes, debug symbols copied from your devices, and archives. Much of it stays until you remove it.
How much space does Xcode take up?
It depends on which platforms and runtimes you install and how many projects and devices you work with, so measure it. Run du -sh /Applications/Xcode.app ~/Library/Developer in Terminal, and check Xcode > Settings > Components, which shows how much storage each component would free.
Is it okay to delete the Xcode cache?
Yes. ~/Library/Caches/com.apple.dt.Xcode and DerivedData are rebuilt by Xcode as you work. Quit Xcode first. Expect the space to come back for projects you still build.
Can I delete the whole ~/Library/Developer folder?
You can, but your archives, every simulator with its apps and data, and your Xcode settings would go with it. Clearing the parts that rebuild gets most of the space without those losses.
Do I really need Xcode on my Mac?
Only if you build apps for Apple platforms or use simulators. For git, clang and other command-line tools, Apple's Command Line Tools package is enough. Install it with xcode-select --install.
Related guides
- How to delete Xcode DerivedData safelyWhere Xcode's DerivedData folder is, why it's safe to delete, and three ways to clear it: Clean Build Folder, Finder, and Terminal with or without the Trash.
- How to delete iOS simulators and free CoreSimulator spaceHow to delete unused iOS simulators, CoreSimulator devices, caches and runtimes with simctl and Xcode, and which simulator folders not to touch by hand.
- What's taking up space on your Mac, and how to see itSee what's taking up space on your Mac or MacBook with Storage settings, folder sizes in Finder and du in Terminal, plus a disk map that explains each folder.
- Is it safe to delete ~/Library/Caches on a Mac?What's inside ~/Library/Caches, which caches are safe to move to the Trash, why they come back, and which Library folders to leave alone on macOS 15 and 26.