SweepBarGet it free

How to free up disk space on a Mac as a developer: 11 safe wins

By EgeTech LTD · October 6, 2026 · 2 min read

A full disk on a developer Mac is rarely a mystery. It is the same dozen folders every time, and most of them rebuild themselves. This checklist goes from the safest and biggest to the ones that need a decision. Work through it in order.

Measure first

These commands only measure:

du -sh ~/Library/Developer/* 2>/dev/null
du -sh ~/Library/Caches/* 2>/dev/null | sort -rh | head -15
du -sh ~/.npm ~/.cache ~/.gradle ~/.bun 2>/dev/null

Now the list.

1. Xcode DerivedData: safe, rebuilds

Build products and indexes for every project you ever opened. Is DerivedData safe to delete? Yes. The next build is slower, nothing else.

2. iOS DeviceSupport: safe, comes back on connect

Several gigabytes per device and OS version, most of them for iOS versions you no longer run. What it is and how to delete it.

3. Old simulator runtimes: safe, but a big re-download

Each iOS or watchOS runtime is several gigabytes. Keep the ones you test on. How to delete runtimes.

4. Simulator data and unavailable simulators

Apps and test data inside simulators, plus devices left behind by old Xcode versions. Reset or delete simulators with simctl.

5. Package caches: safe, downloaded again

npm, pnpm, Yarn and Bun each keep a cache. Together they are often a few gigabytes. npm, pnpm, Yarn and Bun.

6. node_modules in old projects: safe, but check the lockfile

One folder per project, hundreds of megabytes each. Can I delete node_modules? and how to delete them all.

7. Homebrew downloads: safe

brew cleanup removes old versions and stale downloads. Homebrew cleanup.

8. Gradle, and the rest of Android tooling

~/.gradle grows with every project. The Android SDK and emulators add more. Gradle cache and Android Studio storage.

9. Docker’s disk image

Docker Desktop keeps images, containers and volumes in one big file. Docker Desktop disk space.

10. Caches of AI code editors

Editors built on Electron, such as Cursor and VS Code, keep web caches and update downloads. How to clear the Cursor cache.

11. Xcode Archives: a decision, not a cleanup

Archives are not caches. Delete the ones for builds you never shipped, and keep the dSYMs of the ones you did. What to delete and what to keep.

What the table looks like

Item Rebuilds itself? Cost of deleting
DerivedData Yes Slower next build
iOS DeviceSupport Yes A few minutes when you connect a device
Simulator runtimes No, you download them Several GB to download again
Package caches Yes Slower next install, needs network
node_modules Yes, from the lockfile A reinstall
Homebrew downloads Yes Nothing you will notice
Archives No Lose dSYMs of shipped builds

If the number does not change

macOS can take a moment to update the free space, and Finder and the Terminal do not always agree. See why the storage can stay full after deleting files and what purgeable space is. And if the grey bar is the problem, read why System Data is so big on a developer Mac.

Quick answers

What is the fastest way to free up space on a developer Mac?

Start with the files that rebuild themselves: Xcode DerivedData, iOS DeviceSupport and your package caches. They are large, safe to delete and come back on their own.

How much space can I expect to get back?

It depends on how many projects and Xcode versions you have used. On one developer Mac, device symbols alone were about 7 GB and build caches another 1.4 GB, before looking at simulators or old projects.

Should I delete my Xcode archives to free space?

Only the ones for builds you never shipped. Archives of released builds hold the dSYMs you need to read crash reports.