← Blog Mac Productivity

What's Eating Your Mac's Disk? A Developer Guide

By FavTray ·

Written by the team behind FavTray, a Mac developer dashboard for the menu bar. Every app reviewed here is tested on our own Macs.

Short answer: on a developer’s Mac, the usual suspects are Xcode (DerivedData, device support, simulators), build output like node_modules spread across projects, package caches, the Docker or OrbStack disk image, and local AI models. Measure first with read-only commands like du -sh and docker system df. Then clear things with the tool that owns them, not by dragging folders to the Trash.

TL;DR

  • Measure before you delete. Every command in the “measure” lines below only reads.
  • Safe to rebuild: DerivedData, .next/dist/build, most package caches.
  • Downloads again: node_modules, simulator runtimes, Ollama models.
  • Don’t touch by hand: Xcode Archives, Docker’s disk image, virtual machines, Photos and Final Cut libraries.
  • A map instead of a list: FavTray Space does this read-only in one screen, and never deletes a file.

Why is my Mac’s disk full when I haven’t downloaded anything?

Because development tools cache aggressively, and they’re right to: rebuilding is slower than reading from disk. Every Xcode project you open gets a DerivedData folder. Every JavaScript project gets its own node_modules. Every simulator runtime is a full OS image, and every Docker image layer stays until you prune it. None of it shows up as “your files”, so System Settings › General › Storage files most of it under Developer or System Data.

Run this first to see the big picture. It’s read-only, and some folders will say “Operation not permitted” unless Terminal has Full Disk Access:

du -sh ~/Library/Developer ~/Library/Caches ~/.npm ~/.cache ~/Library/Containers 2>/dev/null | sort -h

How much space is Xcode using?

Xcode keeps several things in ~/Library/Developer:

FolderWhat it isHow it comes back
Xcode/DerivedDataBuild products, indexes, logs per projectRebuilds on the next build
Xcode/iOS DeviceSupport (and watchOS, tvOS, visionOS)Symbols copied from each device OS version you’ve connectedCopied again when you connect that device
CoreSimulator/DevicesEvery simulator, with the apps and data installed in itRecreated empty
Simulator runtimesThe OS images simulators bootDownload again in Xcode
Xcode/ArchivesBuilds you archived, with their dSYMsDon’t delete unless you’re sure: you need dSYMs to read crash reports

Measure (read-only):

du -sh ~/Library/Developer/Xcode/DerivedData
du -sh ~/Library/Developer/Xcode/*DeviceSupport
du -sh ~/Library/Developer/CoreSimulator/Devices
xcrun simctl runtime list
xcrun simctl list devices unavailable

Clear it the owner’s way: quit Xcode and remove DerivedData (Xcode › Settings › Locations shows the path and an arrow to it in Finder). Remove runtimes you don’t use in Xcode › Settings › Platforms. xcrun simctl delete unavailable removes simulators whose runtime is already gone.

How much space do node_modules folders use?

Each JavaScript project has its own, and old projects keep theirs forever. This lists them across a code folder without descending into them:

find ~/code -name node_modules -type d -prune -exec du -sh {} + 2>/dev/null | sort -h | tail -20

Swap ~/code for wherever your projects live. The same pattern works for target (Rust), .venv (Python), Pods (CocoaPods), .gradle, .next, dist and build.

Clear it: delete node_modules in projects you haven’t touched in months. npm install (or pnpm install, yarn) brings it back from the lockfile. pnpm keeps one shared store (pnpm store path shows it), which is why pnpm projects are smaller.

How big are my package manager caches?

du -sh ~/.npm ~/Library/Caches/Yarn ~/Library/pnpm ~/.cargo/registry ~/go/pkg/mod ~/.gradle/caches ~/Library/Caches/pip ~/Library/Caches/Homebrew 2>/dev/null
brew cleanup -n   # dry run: lists what Homebrew would remove, removes nothing

Clear it: each tool has its own command, such as brew cleanup, npm cache clean --force, pnpm store prune, go clean -modcache or pip cache purge. Caches come back as you install things, so this buys time rather than space for good.

Why is Docker using so much space on my Mac?

Docker Desktop stores images, containers, volumes and build cache inside a single disk image in ~/Library/Containers/com.docker.docker. It’s a sparse file, so Finder’s size can be misleading; du shows what it really uses. OrbStack, Colima and Podman keep their own equivalents.

Measure (read-only):

docker system df          # images, containers, volumes, build cache
docker system df -v       # per image and per volume
du -sh ~/Library/Containers/com.docker.docker 2>/dev/null

Clear it inside Docker: docker image prune, docker builder prune, or docker system prune (read what each removes first; add --volumes only if you mean it). Docker Desktop’s settings can also cap the disk image size. Never delete the disk image file to save space: it holds your volumes, and your databases with them.

What about local AI models?

Models are large, and each tool keeps its own copy:

du -sh ~/.ollama/models ~/.cache/huggingface ~/.lmstudio 2>/dev/null
ollama list

Clear it: ollama rm <model>, delete models from inside LM Studio, and huggingface-cli delete-cache for the Hugging Face cache. They download again when you need them.

What is “System Data” in Storage settings?

It’s what macOS doesn’t put in another category: caches, logs, local Time Machine snapshots, container and VM disk images, and a lot of developer files. Two read-only checks:

tmutil listlocalsnapshots /     # local Time Machine snapshots
df -h /                          # used and available on the boot volume

macOS removes local snapshots and other purgeable space by itself when it needs room, so a nearly full disk with plenty purgeable isn’t urgent.

What should I never delete by hand?

  • Xcode Archives, unless you’ve kept the dSYMs elsewhere.
  • Docker’s disk image: prune inside Docker instead.
  • Virtual machines (Parallels, UTM) and Photos or Final Cut libraries: remove them from their app.
  • Anything in ~/Library you can’t name. Look it up first.

How does FavTray Space help?

FavTray Space does everything above in one read-only screen, without Terminal:

  • A treemap of every folder, coloured by category, with Size, Files, Age and Tier modes.
  • Worth a look ranks up to six items by size and how easily they come back. It never offers your own work.
  • About 115 rules name developer folders (DerivedData, simulators, node_modules, Cargo target, Pods, .venv, git worktrees), package caches, Docker, OrbStack, Colima and Podman, Ollama, LM Studio and Hugging Face, and game, creative-app and macOS caches.
  • “Where to clear it” opens the owning app (Xcode, Docker Desktop, OrbStack, Ollama, LM Studio, System Settings › Storage and others) with the menu path. It never runs a command.
  • History shows what grew this week and forecasts when the disk fills. Duplicates finds copies of files over 50 MB in your home folder.

Space never deletes, moves or changes a file; FavTray’s build fails if the Space code contains a delete or move call. It’s part of FavTray Pro, with a 7-day trial. Free shows your capacity, the known recoverable total and the top 3 categories with names hidden. For live disk activity per drive, see System.

Frequently Asked Questions

What takes up the most disk space on a developer's Mac?

Usually Xcode (DerivedData, device support files and simulator runtimes), node_modules and other build output across projects, package manager caches, the Docker or OrbStack disk image, and local AI models from Ollama, LM Studio or Hugging Face. Measure each with du before deleting anything.

Is it safe to delete Xcode DerivedData?

Yes. DerivedData holds build products, indexes and logs that Xcode rebuilds. The next build of each project is slower while it rebuilds. Quit Xcode first. Keep ~/Library/Developer/Xcode/Archives unless you're sure you don't need those builds' dSYMs for crash reports.

How do I delete old iOS simulators?

Run xcrun simctl delete unavailable to remove simulators whose runtime is gone, and manage runtimes in Xcode › Settings › Platforms (or xcrun simctl runtime list to see them). Deleting simulators removes the apps and data installed in them.

Why is Docker using so much space on my Mac?

Docker Desktop keeps images, containers, volumes and build cache inside one disk image. docker system df shows how that space splits up, read-only. Prune from inside Docker (docker system prune, or Docker Desktop's settings); deleting the disk image file loses your volumes.

What is System Data in macOS Storage settings?

A catch-all for what macOS doesn't put in another category: caches, logs, local Time Machine snapshots, virtual machine and container disk images, and developer files. A folder-level tool shows what it actually is on your Mac.

Does FavTray Space delete files?

No. FavTray Space is read-only: it measures, names and ranks what's using space, then points you to the app that owns it. It never deletes, moves or changes a file. Space is part of FavTray Pro, with a free teaser that shows totals.

Something new: My Dock Buddies