# What fills a developer’s Mac, and what’s safe to delete

Who it’s for · Updated 21 November 2026. By Mohit Nippanikar, who makes SiftMac.

## The short answer

- **Mostly things that come back.** On a developer’s Mac the space goes to build output and installed packages in old projects, package-manager and IDE caches, old toolchains, Docker and the odd virtual machine. Nearly all of it is made again by one install or build.
- **What it costs you:** time, not data. A cleared project builds slower once, and package managers download again what they need.
- **What doesn’t come back:** unpushed code, Docker volumes, virtual machines and the keys in `~/.ssh`. Check those before you delete anything.

## 1. What fills a developer’s Mac

Every language keeps its own folders, scattered through your home folder rather than in one place, and most of them are hidden. These are the usual ones, with whether they come back:

| What | Where it lives | Comes back? | More |
| --- | --- | --- | --- |
| Packages and build output in old projects | `node_modules`, `.venv`, `target`, `build`, `.gradle` inside each project | Yes, with the project’s install or build | [node_modules](https://siftmac.com/safe-to-delete/node-modules), [Rust target](https://siftmac.com/safe-to-delete/rust-target-folder) |
| Homebrew downloads and old versions | `~/Library/Caches/Homebrew` | Yes, downloaded again when needed | [Homebrew cache](https://siftmac.com/safe-to-delete/homebrew-cache) |
| Rust crates | `~/.cargo/registry` | Yes, downloaded again | [Cargo registry](https://siftmac.com/safe-to-delete/cargo-registry) |
| Go modules and build cache | `~/go/pkg/mod`, `~/Library/Caches/go-build` | Yes | [Go caches](https://siftmac.com/safe-to-delete/go-module-cache) |
| Gradle and Maven dependencies | `~/.gradle/caches`, `~/.m2/repository` | Yes, on the next build | [Gradle](https://siftmac.com/safe-to-delete/gradle-caches), [Maven](https://siftmac.com/safe-to-delete/maven-repository) |
| IDE caches and logs | `~/Library/Caches/JetBrains`, VS Code’s cache folders | Yes | [JetBrains](https://siftmac.com/safe-to-delete/jetbrains-caches), [VS Code](https://siftmac.com/safe-to-delete/vs-code-cache) |
| Docker images, containers and volumes | One disk image, `Docker.raw` | Images pull again; volumes don’t | [Docker.raw](https://siftmac.com/safe-to-delete/docker-raw) |
| Virtual machines | `~/Parallels`, or UTM’s own folder | No: each holds a whole system | [Parallels](https://siftmac.com/safe-to-delete/parallels-virtual-machines), [UTM](https://siftmac.com/safe-to-delete/utm-virtual-machines) |
| Old language versions | `~/.nvm`, `~/.pyenv`, `~/.rustup` | Only by installing them again | — |
| Android SDK and emulators | `~/Library/Android/sdk`, `~/.android/avd` | Downloaded again in Android Studio | [Android SDK](https://siftmac.com/safe-to-delete/android-sdk), [emulators](https://siftmac.com/safe-to-delete/android-emulators) |
| Repositories you cloned once | Anywhere, each with its `.git` folder | Only from the remote | [.git folders](https://siftmac.com/safe-to-delete/git-folder) |

Measure before you delete. This lists the shared caches and toolchains, biggest last; folders you don’t have are skipped:

```
du -sh ~/Library/Caches/Homebrew ~/.cargo ~/go/pkg/mod ~/Library/Caches/go-build ~/.gradle ~/.m2 ~/Library/Caches/JetBrains ~/.nvm ~/.pyenv ~/.rustup ~/Parallels 2>/dev/null | sort -h
```

Build folders hide inside projects. For Rust’s `target` folders, for example (change `~/code` to wherever you keep projects):

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

If most of your work is one stack, there’s a closer page: [iOS and Mac developers](https://siftmac.com/for/ios-developers) for Xcode, [web developers](https://siftmac.com/for/web-developers) for Node and Docker, [AI developers](https://siftmac.com/for/ai-developers) for local models and coding agents, and [data scientists](https://siftmac.com/for/data-scientists) for conda, notebooks and datasets.

## 2. What’s safe to clear, and what to keep

### Clear with each tool’s own command

- **Homebrew:** `brew cleanup` removes outdated downloads, old versions of what you’ve installed and downloads more than 120 days old; `brew cleanup --prune=all` empties the download cache. `brew autoremove` uninstalls dependencies nothing needs any more. Homebrew already runs a cleanup after installs, and for everything every 30 days, unless you’ve turned that off.
- **Rust:** `cargo clean` in a project you’ve finished removes its `target` folder, often the largest thing in a Rust repository. Since Rust 1.88, Cargo also removes crates it hasn’t used for three months from `~/.cargo` by itself.
- **Go:** `go clean -modcache` removes downloaded modules and `go clean -cache` the build cache. Go trims its build cache by itself over time, so the module cache is usually the bigger win.
- **Gradle:** Gradle deletes version-specific caches after 30 days without use, and unused wrapper distributions with them. To clear everything now, stop the daemons with `./gradlew --stop`, then delete `~/.gradle/caches`.
- **Maven:** `~/.m2/repository` is only downloaded libraries, so the next build fetches what it needs. Keep `~/.m2/settings.xml`, which can hold repository credentials.
- **JetBrains IDEs:** each version keeps caches in `~/Library/Caches/JetBrains/<product><version>`. A new major version deletes the caches and logs of versions not updated for 180 days, and **Help › Delete Leftover IDE Directories…** removes what’s left of versions you’ve stopped using.
- **Language versions:** list what’s installed and remove what no project pins: `nvm ls` and `nvm uninstall <version>`, `pyenv versions` and `pyenv uninstall <version>`, `rustup toolchain list` and `rustup toolchain remove <name>`.

### Delete by hand, in projects you’ve finished

Dependency and build folders in a project you haven’t touched for months are the safe bulk: `target`, `build`, `.gradle`, `node_modules`, `.venv`. Check first that the file that rebuilds each one is still there (`Cargo.toml`, `build.gradle`, `package.json` with its lockfile, `requirements.txt` or `pyproject.toml`), because that file is how it comes back.

### Keep, or think twice

- **Work that exists only here.** Before deleting a project folder, run `git status`, `git stash list` and `git branch -vv`, which marks branches ahead of their remote. Stashes and unpushed branches live only in `.git`.
- **Docker volumes.** They hold local databases and other state. `docker system prune` leaves them alone unless you add `--volumes`.
- **Virtual machines.** A VM is a whole computer’s disk. Remove one from Parallels or UTM itself, and only when nothing in it matters.
- **Keys and configuration:** `~/.ssh`, `~/.gnupg`, `~/.aws`, `~/.config`, `~/.gitconfig`. They take almost no space and can’t be downloaded again.

## 3. How SiftMac helps a developer

SiftMac’s [developer files](https://siftmac.com/features/developer-files) walk the folders in your home folder looking for projects. They list build folders and packages only in projects you haven’t changed for 1, 3 or 6 months (3 by default), and only when the file that rebuilds them sits next to them: `Cargo.toml` for `target`, a Gradle build or settings file for `build` and `.gradle`, `Package.swift` for `.build`, `Podfile` for `Pods`, `pubspec.yaml` for Flutter, `package.json` for `node_modules`, and a requirements file or `pyproject.toml` for a Python environment.

- Activity comes from the project’s own files and its git history, not folder dates, which Finder changes just by browsing. A package in a monorepo shares the whole repository’s activity.
- Anything a running program was started from, like a Python environment with a script running, is [in use](https://siftmac.com/features/in-use-protection): skipped, and checked again right before cleaning.
- Package-manager caches in `~/Library/Caches` (Homebrew, pip, Yarn, pnpm, Go’s build cache, JetBrains, Playwright and others) get the verdict **Rebuilds**. The JetBrains folder is left alone while a JetBrains IDE is open.
- Docker is opt-in. Turn it on in Settings and SiftMac asks Docker what it can reclaim, then frees it with Docker’s own prune commands. Volumes are never touched.
- Developer items start unticked and are deleted rather than shelved, since your next build makes them again.

What it leaves to you: `~/.cargo`, `~/go`, `~/.gradle`, `~/.m2`, `~/.npm`, `~/.nvm`, language versions and virtual machines. SiftMac doesn’t clean those. The [space map](https://siftmac.com/features/space-map) shows how big each one is, with a plain note on the folders it knows, so you can clear them with the commands above.

## 4. A cleanup routine for a developer’s Mac

1. Push your work, and note the projects you’re in this month. Those are off limits today.
2. Measure with the commands above, or open the space map, and write down the three biggest things.
3. Clear shared caches with their own commands: `brew cleanup`, `go clean -modcache`, and the npm or pip equivalents if you use them.
4. In finished projects, run each one’s own clean (`cargo clean`, `./gradlew clean`, `flutter clean`) or delete its dependency folders.
5. Remove language versions and toolchains nothing uses, with nvm, pyenv or rustup.
6. If you use Docker, `docker system df` shows what’s reclaimable and `docker system prune` frees stopped containers, unused networks, dangling images and build cache. Leave volumes unless you know what’s in them.
7. Empty the Trash and measure again. Repeat when you finish a project, or when the [disk-full forecast](https://siftmac.com/features/disk-full-forecast) says you’re a few weeks from full.

## Questions

### Is it safe to delete ~/Library/Developer or ~/.cache all at once?

Not in one go. Both hold a mix: `~/Library/Developer` has simulators with app data and Xcode archives you may need, and `~/.cache` can hold downloaded models next to tool caches. Clear them piece by piece, with each tool’s own command.

### Will deleting build folders break my projects?

No, as long as the file that describes the build is still there: `Cargo.toml`, `build.gradle`, `package.json` with its lockfile. The next build or install recreates the folder; it just takes longer the first time.

### Can I keep caches somewhere other than the internal disk?

Several tools let you choose: `HOMEBREW_CACHE` for Homebrew, `GOCACHE` for Go’s build cache and `GRADLE_USER_HOME` for Gradle, and Docker Desktop can move its disk image in its Resources settings. Point them at an external SSD that stays connected.

### Does SiftMac delete anything in a project I’m working on?

No. Build folders are listed only in projects unchanged for the period you pick, at least a month, and only where the file that rebuilds them is present. Nothing is ticked until you tick it.

## How SiftMac handles it

SiftMac lists build folders and packages only in projects you haven’t changed for months and only where the file that rebuilds them is present, skips anything a running program uses, and frees Docker space only through Docker’s own prune commands when you turn that on.

Download: https://siftmac.com/SiftMac.dmg (scanning is free, and so is the first 2 GB of cleaning).

## Sources

- [Homebrew: brew cleanup and brew autoremove (manpage)](https://docs.brew.sh/Manpage)
- [Rust blog: Cargo’s automatic cache cleaning in Rust 1.88](https://blog.rust-lang.org/2025/06/26/Rust-1.88.0)
- [Go: go clean and the build cache](https://pkg.go.dev/cmd/go)
- [Gradle: Gradle-managed directories and cache cleanup](https://docs.gradle.org/current/userguide/directory_layout.html)
- [JetBrains: directories used by the IDE](https://www.jetbrains.com/help/idea/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html)
- [Docker: docker system prune](https://docs.docker.com/reference/cli/docker/system/prune/)

## Related

- [Xcode DerivedData, node_modules and Docker: what’s safe to delete on a developer’s Mac](https://siftmac.com/guides/developer-files-on-mac)
- [What fills an iOS or Mac developer’s Mac, and what Xcode makes again](https://siftmac.com/for/ios-developers)
- [What fills a web developer’s Mac, from node_modules to Docker](https://siftmac.com/for/web-developers)
- [Developer files: what SiftMac clears, and how it knows it comes back](https://siftmac.com/features/developer-files)
- [Is it safe to delete ~/Library/Caches/Homebrew?](https://siftmac.com/safe-to-delete/homebrew-cache)

Canonical: https://siftmac.com/for/developers
