Is Xcode's Download Cache Safe to Delete? (com.apple.dt.Xcode)
~/Library/Caches/com.apple.dt.XcodeYes, you can delete ~/Library/Caches/com.apple.dt.Xcode without breaking anything. It's Xcode's download cache: documentation, simulator runtimes in mid-download, and other transient data that Xcode fetches again when it needs it. Quit Xcode first, move the contents to the Trash, and you're done. The only cost is that Xcode may re-download some of it later.
What it is
com.apple.dt.Xcode inside ~/Library/Caches is the standard macOS cache folder for Xcode. Xcode uses it as a scratch area for things it pulls from Apple's servers: documentation sets, simulator runtimes that are still downloading, and assorted transient files it doesn't need to keep permanently. It's separate from your projects, your build products, and Xcode itself.
Most of the time this folder stays modest, often a few hundred megabytes. It balloons when a big download is in flight or gets interrupted. A single iOS simulator runtime runs several gigabytes, so a stalled or half-finished runtime download can leave multiple gigabytes of dead weight sitting in the cache. That's the usual reason this folder shows up when you're hunting for what's eating your disk.
Is it safe to delete?
This is one of the least risky folders in the whole Xcode ecosystem. Nothing in it is a source of truth: no project files, no code signing identities, no settings. Deleting it can't corrupt a project or break your Xcode install. Worst case, Xcode re-downloads a documentation set or restarts a runtime download the next time it wants one, which costs you bandwidth and a bit of waiting, not data.
Two small courtesies make it painless. Quit Xcode before you delete, so it isn't writing to the cache while you empty it. And if you were mid-download on a simulator runtime, expect to kick that download off again afterward from Xcode's settings. Diskmack flags this folder automatically and clears it the safe way, with Xcode's state left intact.
How to check its size
In Finder: In Finder, choose Go > Go to Folder (or press Cmd+Shift+G), paste ~/Library/Caches/com.apple.dt.Xcode and press Return. Select the folder, then press Cmd+I to see its size in the Get Info window.
In Terminal:
du -sh ~/Library/Caches/com.apple.dt.XcodeThe ~ expands to your home folder automatically in Terminal.
How to clean it
- Quit Xcode completely (Cmd+Q, not just closing the window).
- In Finder, choose Go > Go to Folder and enter ~/Library/Caches/com.apple.dt.Xcode.
- Press Cmd+A to select everything inside, then drag it to the Trash (or press Cmd+Delete).
- Empty the Trash to actually reclaim the space.
- Reopen Xcode. The now empty folder refills on its own as Xcode re-downloads anything it still needs.
If a simulator runtime was downloading when you cleared the cache, restart that download from Xcode's Settings under Platforms (Preferences > Components in Xcode 13 and earlier).
Will it come back?
Yes, it comes back, and that's by design. Xcode refills the cache as it downloads documentation and runtimes, and recreates the folder itself if it's missing. In normal use it settles at a modest size, so clearing it isn't something you need to do weekly. The exception is interrupted downloads: if your network dropped mid-runtime, the cache can hold gigabytes of orphaned partial files that never get cleaned up on their own. Checking it after a failed download is usually when the payoff is biggest.
Common questions
Will deleting this break Xcode or my projects?
No. The folder holds only transient downloaded data. Your projects, signing certificates, and Xcode preferences live elsewhere. Xcode recreates the cache automatically and re-downloads what it needs.
Why is this folder several gigabytes?
Almost always a simulator runtime download. Each iOS runtime is several gigabytes, and if a download stalls or fails, the partial file can sit in the cache indefinitely. Clearing the folder removes those orphans.
Is this the same as DerivedData?
No. DerivedData lives at ~/Library/Developer/Xcode/DerivedData and holds build products and indexes, which is usually a much bigger folder. com.apple.dt.Xcode in ~/Library/Caches is just the download cache. Both are safe to clear, but they're separate cleanups.
Should Xcode be closed when I delete it?
Yes. Quit Xcode first so it isn't writing to the cache while you empty it. If Xcode is mid-download, deleting the cache cancels that download and you'll need to restart it.