If you've been using Anaconda or Miniconda for data science or ML work on your Mac, you already know the drill: you install a few environments, update packages over a few months, and suddenly conda clean disk space becomes an urgent task. Conda's package cache, tarballs, and accumulated environments can quietly consume 30 GB or more before you notice — and on a 512 GB Apple Silicon MacBook, that's a meaningful chunk of storage. This guide explains exactly where conda stores everything, how to safely remove what you no longer need, and how to keep the footprint manageable going forward.
Where Conda Puts Its Files on macOS
Conda isn't one folder — it spreads files across several locations depending on how you installed it and how many environments you've created. Here's the full map:
| Location | Default Path | What Lives There | Typical Size |
|---|---|---|---|
| Base environment | ~/opt/anaconda3/ or ~/opt/miniconda3/ |
Conda itself, base Python, built-in packages | 3–8 GB |
| Named environments | ~/opt/anaconda3/envs/ |
All conda create -n environments |
1–10 GB each |
| Package cache | ~/opt/anaconda3/pkgs/ |
Extracted package files (hardlinked) | 5–20 GB |
| Tarball cache | ~/opt/anaconda3/pkgs/ |
Downloaded .conda and .tar.bz2 archives |
2–10 GB |
| Conda index cache | ~/.conda/ |
Channel metadata and repodata | 50–500 MB |
| Miniforge / Mambaforge | ~/miniforge3/ or ~/mambaforge/ |
Alternate installer roots | Varies |
If you're on a shared machine or used multiple installers, you may have two or three separate roots all accumulating caches independently. Check what you actually have:
ls -lh ~/opt/anaconda3 ~/opt/miniconda3 ~/miniforge3 ~/mambaforge 2>/dev/null
How Big Is Conda Actually Using?
Before you delete anything, get an accurate read on what's consuming space. Run these commands in Terminal:
# Total size of your conda root
du -sh ~/opt/anaconda3
# Break it down by envs vs pkgs cache
du -sh ~/opt/anaconda3/envs/*
du -sh ~/opt/anaconda3/pkgs
On a Mac that's been running for a year or two, pkgs/ alone commonly reaches 15–20 GB. Each named environment under envs/ can be 1–4 GB depending on what's installed. If you have six or seven environments, the math adds up fast. This is also a good moment to check your broader disk usage — tools like what is taking up space on my Mac give you the full picture beyond just conda.
How to Clean Conda's Package Cache (The Safe First Step)
The safest and most impactful place to start is the package cache. Conda keeps downloaded tarballs and extracted packages so it can reinstall quickly without hitting the network. Over time these accumulate far beyond what any active environment actually references.
Step 1 — Run a dry run to see what will be removed
conda clean --all --dry-run
This shows you a preview: tarballs, unused packages, index caches, and log files that conda considers safe to delete. Review the output before committing.
Step 2 — Remove tarballs only (fastest, safest)
conda clean --tarballs
This deletes only the compressed .conda and .tar.bz2 archives. The extracted package files remain, so re-installs are still fast. On a machine that's been active for a year this alone can recover 5–10 GB.
Step 3 — Remove all unused packages and tarballs
conda clean --all
The --all flag covers tarballs, unused cached packages (those not referenced by any current environment), index caches, and lock files. Conda's solver is smart enough to only remove packages that aren't hardlinked into any active environment, so running this command will not break existing environments.
Step 4 — Verify the result
du -sh ~/opt/anaconda3/pkgs
After a full clean on a mature install, it's common to see pkgs/ shrink from 18 GB down to 2–3 GB.
Removing Environments You No Longer Use
Named environments are often the largest single contributor to conda's footprint, and they rarely get cleaned up automatically. List everything you have:
conda env list
Each line shows a name and a path. For any environment you no longer actively use, remove it:
conda env remove -n old-project-env
Or target it by path if it's outside the default location:
conda env remove -p /path/to/env
You can also just delete the directory manually — conda environments are self-contained folders and nothing will break if you rm -rf one. But using conda env remove is cleaner because it also updates the internal environments registry at ~/.conda/environments.txt.
Before you delete: export a spec file
If there's any chance you'll want to recreate the environment later, export its spec first:
conda activate old-project-env
conda env export > old-project-env.yml
Recreating from a YAML takes a few minutes and costs nothing in terms of disk space until you actually need it again.
Cleaning pip Caches Inside Conda Environments
Many conda environments also have pip installed, and pip maintains its own download cache. After running conda clean --all, check for pip leftovers:
# pip's cache lives here on macOS
du -sh ~/Library/Caches/pip
Clear it with:
pip cache purge
If you have multiple conda environments each with their own pip, you'll need to activate each one and run the purge, or delete ~/Library/Caches/pip directly — it's safe to remove the entire folder and pip will recreate it as needed.
While you're auditing developer caches, it's worth noting that node_modules and similar language-level caches follow the same pattern of silent accumulation, and the cleanup strategy is similar: identify, audit, remove what's no longer needed.
Dealing with Miniforge, Mambaforge, and Multiple Roots
Apple Silicon Macs pushed many developers toward Miniforge (which defaults to the conda-forge channel and installs native arm64 packages). If you installed Miniforge separately from Anaconda, you have two independent conda roots — each with its own pkgs/ cache and envs/ folder. You need to run conda clean --all from within each installation's environment:
# Clean Anaconda root
~/opt/anaconda3/bin/conda clean --all
# Clean Miniforge root
~/miniforge3/bin/conda clean --all
If you've settled on one as your primary workflow, consider uninstalling the other entirely. Removing an entire conda root is straightforward — just delete the root directory and remove the initialization block from your shell config (~/.zshrc on macOS Sequoia and later):
# Example: remove a Miniforge install
rm -rf ~/miniforge3
# Then edit ~/.zshrc to remove the conda initialize block
Preventing Conda From Accumulating Disk Waste Again
A few habits and configuration changes keep the footprint manageable over time:
- Set a package cache limit. In
~/.condarc, you can configure conda to automatically remove tarballs after install:always_softlink: true
More importantly, get in the habit of runningconda clean --tarballsafter any large install session. - Use mamba for faster solves with less retry overhead.
mamba(a drop-in conda replacement) often downloads fewer packages during dependency resolution, which means less cached waste. - Audit environments quarterly. Run
conda env listevery few months and remove anything unused. A single stale GPU/ML environment can be 4–5 GB. - Pin your channels. Mixing
defaultsandconda-forgein the same environment leads to solver conflicts and repeated package downloads. Stick to one channel per environment. - Consider micromamba for lightweight installs.
micromambais a statically compiled binary with no base environment, so you don't carry the 3–5 GB base overhead at all.
What Crumb Sees and What to Do With It
Conda's multi-location structure — root installs, pkgs/ caches, pip caches in ~/Library/Caches/pip, and multiple possible roots — makes it easy to miss large folders during a manual audit. A tool like Crumb can audit all of these at once and show what's safe before you delete, which is useful when you're not certain which conda root is active or whether a pkgs/ folder is still being referenced. That said, the manual commands above are entirely sufficient and are the right first step regardless of what tool you use.
If you want a broader view of what's consuming storage across your whole machine — not just conda — the guide on how to free up space on Mac covers the full landscape including Xcode data, iOS backups, language caches, and more.
Quick Reference: Conda Cleanup Commands
conda clean --tarballs— Remove downloaded archives only (safe, fast)conda clean --packages— Remove unused extracted packagesconda clean --index-cache— Remove channel metadata cacheconda clean --all— Do all of the above in one shotconda clean --all --dry-run— Preview what will be removed without deletingconda env remove -n env-name— Delete a named environmentpip cache purge— Clear pip's download cachedu -sh ~/opt/anaconda3/pkgs— Check current package cache size