Safe to delete or not? A reference for developer folders on macOS
The question behind every disk cleanup is the same: if I delete this, will it come back? For developer folders the answer is knowable, because each one is either regenerated by a tool, re-downloadable from a registry, or the only copy of something you made. This page sorts the usual suspects into those three groups.
- R Recoverable: a build or a download recreates it. Delete freely.
- I Irrecoverable: nothing regenerates it. Delete only if you know you do not need it.
- P Protected: your work, credentials or state a tool needs to run. Never part of a cleanup.
How to read the three marks
The mark is about provenance, not size or age. A 40 GB folder of Hugging Face weights is R because the registry answers for every revision. A 2 MB SQLite file in an editor's folder can be P because it is an unsaved buffer. When you cannot prove which group a folder belongs to, it stays locked; an unproven claim is not a fourth mark, it is the lock.
Build products and derived files
| Folder | Mark | Why |
|---|---|---|
~/Library/Developer/Xcode/DerivedData | R | Regenerated on the next build |
~/Library/Developer/Xcode/Archives | I | dSYMs for shipped builds; nothing recreates them |
~/Library/Developer/Xcode/iOS DeviceSupport | R | Re-copied from a connected device |
~/Library/Developer/CoreSimulator/Devices (unavailable runtimes) | R | xcrun simctl delete unavailable |
| Simulator devices you still use | I | App data inside them is not backed up anywhere |
Rust target/, Go build cache, Gradle build/ | R | Rebuilt from source |
.next/, dist/, .turbo/, .parcel-cache/ | R | Rebuilt from source |
Dependencies and package caches
| Folder | Mark | Why |
|---|---|---|
node_modules/ (lockfile committed) | R | npm ci restores it exactly |
node_modules/ (no lockfile) | I | Reinstall may resolve different versions |
~/.npm/_cacache, ~/Library/pnpm/store, Yarn cache | R | Re-downloaded from the npm registry |
~/Library/Caches/pip, conda pkgs/ | R | Re-downloaded from PyPI / conda channels |
Virtual environments (.venv, conda envs) | R if requirements are pinned, else I | Depends on whether the env can be rebuilt |
~/.cargo/registry, ~/go/pkg/mod | R | Re-fetched from crates.io / proxy.golang.org |
~/.gradle/caches, ~/.m2/repository | R | Re-downloaded from Maven repositories |
~/Library/Caches/Homebrew, old kegs | R | brew cleanup re-downloads on demand |
~/Library/Caches/CocoaPods, SwiftPM cache | R | Re-fetched on install / resolve |
Models and datasets
| Folder | Mark | Why |
|---|---|---|
~/.cache/huggingface/hub (downloaded revisions) | R | The Hub serves every revision by hash |
| Your own fine-tuned checkpoints saved anywhere | P | Exist nowhere else |
~/.ollama/models | R | ollama pull restores; remove with ollama rm |
~/.lmstudio/models | R | Re-downloaded from the catalog |
~/.cache/torch, Keras and TensorFlow caches | R | Re-downloaded on first use |
| Datasets you built or labelled | P | Your work |
Containers and virtual machines
| Folder | Mark | Why |
|---|---|---|
| Docker images pulled from a registry | R | docker pull restores; remove with docker image prune |
| Docker images built locally and never pushed | I | Rebuildable only if the Dockerfile and context still exist |
| Docker volumes | P | Databases and app state live here |
Docker.raw itself | P | Delete contents through Docker, never the file |
Android AVDs (~/.android/avd) | I | Recreatable, but app data inside is lost |
Editors, agents and tool state
| Folder | Mark | Why |
|---|---|---|
VS Code CachedExtensions, CachedProfilesData | R | Rebuilt from installed extensions |
VS Code Backups/<workspace>/untitled | P | Unsaved editor buffers, never written to disk anywhere else |
| JetBrains caches and indexes | R | Re-indexed on open |
| JetBrains local history | I | Per-file undo beyond git; nothing recreates it |
Coding-agent session logs and caches (dot-folders in ~) | I logs, R caches | Transcripts are not regenerable; caches are |
~/.ssh, ~/.aws, ~/.config/gh, keychains | P | Credentials |
| Git repositories with unpushed commits or stashes | P | The only copy of that work |
Two habits that keep the list honest
- Delete through the owner.
brew cleanup,ollama rm,docker system prune,xcrun simctl delete. The tool updates its own index, so you never end up with a registry entry pointing at a folder that no longer exists. - Prefer a way back. Move to Trash or a quarantine folder instead of
rm -rfwhen the mark is I. A week later, if nothing complained, empty it.
This is the rulebook Latent applies on every scan: R is offered for one-click removal, I is offered with the reason written next to it, P is never offered at all, and anything it cannot prove stays locked.
Questions people ask
What is the difference between a cache I can delete and one I should not?
A cache is safe when a tool or a registry can recreate it: package caches, build products, downloaded model weights. It is not safe when it is the only copy of something: unsaved editor buffers, unpushed commits, self-trained checkpoints, Docker volumes with database data.
Is it safe to delete the Hugging Face cache?
Yes for downloaded model revisions in ~/.cache/huggingface/hub, because the Hub serves every revision by hash. Use huggingface-cli delete-cache to pick what goes. Checkpoints you trained and saved there yourself are not re-downloadable.
Should I delete Xcode Archives to save space?
Only if you no longer need to symbolicate crash logs from those builds, or you uploaded the dSYMs to App Store Connect or a crash reporting service. The archive is the only local copy of the debug symbols.
Are Docker volumes safe to prune?
Not blindly. Volumes hold database files and application state that containers write. Run docker volume ls, identify volumes belonging to projects you are done with, and remove those by name.
Let Latent do the attribution
Latent scans a developer Mac, attributes every gigabyte to the tool that owns it, marks each folder R, I or P with the reason, and only offers what it can prove is safe. One-time license, three Macs.
Download for MacHow it works