Skip to content
MacClearings

Why Xcode takes up so much space, and what you can clear

By Updated 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
  1. Where Xcode's space actually goes
  2. Why Xcode itself is so big
  3. Measure before you clear anything
  4. Clear Xcode's space, step by step
  5. Xcode caches: are they safe to delete?
  6. Device support files
  7. Archives
  8. What's safe to remove, and what isn't
  9. How MacClearings shows Xcode's space

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.

WhatWhereComes back on its own?
The Xcode app/Applications/Xcode.appIt's the app
Simulator runtimes (iOS, watchOS, tvOS, visionOS)/Library/Developer/CoreSimulator and /System/Library/AssetsV2Only if you download them again
Build data, one folder per project~/Library/Developer/Xcode/DerivedDataYes, when you build
Simulators, with the apps and data on them~/Library/Developer/CoreSimulator/DevicesDefault ones are recreated, your data isn't
Device support files~/Library/Developer/Xcode/iOS DeviceSupport and the other platforms' foldersYes, when you connect a device running that version
Archives~/Library/Developer/Xcode/ArchivesNo
Caches~/Library/Caches/com.apple.dt.Xcode, ~/Library/Developer/CoreSimulator/CachesYes, quickly
SwiftUI preview data~/Library/Developer/Xcode/UserData/PreviewsYes, 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 Go, then Go to Folder, type ~/Library/Developer 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/Developer 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. Xcode, then Settings, then Components 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, Apple menu, then System Settings, then General, then Storage 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.

  1. 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.

  2. Delete unavailable simulators

    In Terminal, run xcrun simctl delete unavailable. It removes simulators whose runtime is no longer installed.

  3. 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.

  4. Remove old device support files

    Open ~/Library/Developer/Xcode/iOS DeviceSupport and move folders for OS versions you no longer debug to the Trash.

  5. Review your archives

    Choose Window > Organizer, click Archives, and remove archives you'll never need. Keep the ones for builds you shipped.

  6. 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/Caches 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.
From the MacClearings field guide, as it appears in the app.

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.
From the MacClearings field guide, as it appears in the app.

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
From the MacClearings field guide, as it appears in the app.

Manage them in Window, then Organizer 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/Developer/Xcode/UserData, which holds your key bindings, code snippets and themes
  • The runtime disk images in /Library/Developer/CoreSimulator and /System/Library/AssetsV2. Remove runtimes through Xcode or 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/Developer/CommandLineTools 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/Developer and the inspector says what each folder is, which app made it and whether it comes back, from the same field guide quoted above.

MacClearings Map: a treemap of the home folder with a list of its biggest folders and an inspector explaining what the selected folder is.
The Map in MacClearings, showing a home folder as a treemap. Inside Library, the Developer folder, where Xcode keeps its data, is the largest block. The inspector explains whatever you select.

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.

Find out what's filling your Mac.

MacClearings explains your disk in plain words and moves only what you review to the Trash, with Undo. Paid once, every update included.

Get it at launch

$12.50 launch price for the first 25 buyers, then $25.

macOS 15+ · Apple silicon and Intel