Founder deal: every app we make, with updates forever, for $25 once. Limited to the first 50 buyersSee the deal

Guides

How to clean a developer Mac without breaking anything

Updated 27 October 2026

A developer Mac fills up in places macOS lumps together as “System Data”. Most of it is safe to remove. Some of it looks like junk and is not. The question for every folder is the same: what happens if it is gone? There are three answers.

  • It rebuilds itself. The tool makes it again when needed. You lose time, not data.
  • It downloads again. Safe, but the next install or build needs the network and waits.
  • It is yours. Nothing makes it again. Look before you remove it.

Xcode

WhatWhereIf it is gone
Build data~/Library/Developer/Xcode/DerivedDataRebuilds itself on the next build
Device support~/Library/Developer/Xcode/iOS DeviceSupportDownloads again when you connect that device
Simulator caches~/Library/Developer/CoreSimulator/CachesRebuilds itself
Archives~/Library/Developer/Xcode/ArchivesYours. The builds you shipped, with their debug symbols

Simulators for iOS versions you removed are dead weight. Remove only those:

xcrun simctl delete unavailable

Docker

Docker keeps images, stopped containers, build cache and volumes. The first three come back; volumes are databases and do not.

docker container prune   # stopped containers
docker image prune       # images no container or tag uses
docker builder prune     # build cache

Never run docker system prune --volumes unless you are sure no volume holds data you need.

node_modules and other project dependencies

node_modules, .venv and similar folders are downloaded again by npm install, pnpm install or pip install. Removing them from projects you have not touched in months is the biggest safe win on most JavaScript machines. Leave the ones in projects you are working on this week, or your next run waits for a full install.

Build output beside a project file (target next to Cargo.toml, dist or build next to package.json) rebuilds itself. A folder named build with no project file beside it may be someone’s documents.

Package manager caches

All of these download again:

brew cleanup             # old Homebrew downloads and versions
npm cache clean --force  # npm's download cache
pnpm store prune         # packages no project uses any more

Cargo’s ~/.cargo/registry/cache, Gradle’s ~/.gradle/caches and uv’s ~/.cache/uv work the same way.

AI coding tools

AI tools leave three kinds of things behind, and they are not equally safe.

  • Scratch and cache folders rebuild themselves. Remove a finished session’s, never a running one’s.
  • Local models (Ollama, LM Studio, Hugging Face) download again, but each one is gigabytes. Remove the ones you stopped using, not the one you use daily.
  • Worktrees are full copies of a repository. One can go only when git status inside it is clean and every commit is pushed or merged. Remove it with git worktree remove so git forgets it too.
  • Session transcripts are yours: they are what lets you resume a conversation. Claude Code deletes old ones by itself after 30 days by default (the cleanupPeriodDays setting). Keep any memory folder next to them; that is what the tool remembers about your projects.

Doing it with an app

Kempt and DiskAtlas sort Xcode data, dependencies, package caches and AI tool folders by the same three answers (Docker they leave to Docker). They list every item by name and path before anything moves and send what you choose to the Trash, so any of it can go back. Dependencies are never ticked for you, a worktree is offered only when git says it is clean and pushed, and a running AI session is never offered.