Latent

Safe to delete or not? A reference for developer folders on macOS

2026-09-07 · about 3 min · by the Latent team

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.

In short
  • 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

FolderMarkWhy
~/Library/Developer/Xcode/DerivedDataRRegenerated on the next build
~/Library/Developer/Xcode/ArchivesIdSYMs for shipped builds; nothing recreates them
~/Library/Developer/Xcode/iOS DeviceSupportRRe-copied from a connected device
~/Library/Developer/CoreSimulator/Devices (unavailable runtimes)Rxcrun simctl delete unavailable
Simulator devices you still useIApp data inside them is not backed up anywhere
Rust target/, Go build cache, Gradle build/RRebuilt from source
.next/, dist/, .turbo/, .parcel-cache/RRebuilt from source

Dependencies and package caches

FolderMarkWhy
node_modules/ (lockfile committed)Rnpm ci restores it exactly
node_modules/ (no lockfile)IReinstall may resolve different versions
~/.npm/_cacache, ~/Library/pnpm/store, Yarn cacheRRe-downloaded from the npm registry
~/Library/Caches/pip, conda pkgs/RRe-downloaded from PyPI / conda channels
Virtual environments (.venv, conda envs)R if requirements are pinned, else IDepends on whether the env can be rebuilt
~/.cargo/registry, ~/go/pkg/modRRe-fetched from crates.io / proxy.golang.org
~/.gradle/caches, ~/.m2/repositoryRRe-downloaded from Maven repositories
~/Library/Caches/Homebrew, old kegsRbrew cleanup re-downloads on demand
~/Library/Caches/CocoaPods, SwiftPM cacheRRe-fetched on install / resolve

Models and datasets

FolderMarkWhy
~/.cache/huggingface/hub (downloaded revisions)RThe Hub serves every revision by hash
Your own fine-tuned checkpoints saved anywherePExist nowhere else
~/.ollama/modelsRollama pull restores; remove with ollama rm
~/.lmstudio/modelsRRe-downloaded from the catalog
~/.cache/torch, Keras and TensorFlow cachesRRe-downloaded on first use
Datasets you built or labelledPYour work

Containers and virtual machines

FolderMarkWhy
Docker images pulled from a registryRdocker pull restores; remove with docker image prune
Docker images built locally and never pushedIRebuildable only if the Dockerfile and context still exist
Docker volumesPDatabases and app state live here
Docker.raw itselfPDelete contents through Docker, never the file
Android AVDs (~/.android/avd)IRecreatable, but app data inside is lost

Editors, agents and tool state

FolderMarkWhy
VS Code CachedExtensions, CachedProfilesDataRRebuilt from installed extensions
VS Code Backups/<workspace>/untitledPUnsaved editor buffers, never written to disk anywhere else
JetBrains caches and indexesRRe-indexed on open
JetBrains local historyIPer-file undo beyond git; nothing recreates it
Coding-agent session logs and caches (dot-folders in ~)I logs, R cachesTranscripts are not regenerable; caches are
~/.ssh, ~/.aws, ~/.config/gh, keychainsPCredentials
Git repositories with unpushed commits or stashesPThe only copy of that work

Two habits that keep the list honest

  1. 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.
  2. Prefer a way back. Move to Trash or a quarantine folder instead of rm -rf when 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