# Conda Package Cache on Mac: Is It Safe to Clean?

> Conda keeps downloaded packages in pkgs folders that environments are built from. conda clean removes unused ones safely; deleting by hand needs care.

- Updated: 2026-10-10
- URL: https://fresh.ist/caches/conda/

**TL;DR:** Mostly yes. Conda's package cache (pkgs) holds downloaded tarballs and extracted packages that environments are created from. conda clean --all removes the tarballs and any package no environment still uses, without breaking anything. Deleting the folder by hand is riskier: environments built with symlinks back to the cache can break, and future installs re-download everything.

## Facts from the Freshist app

- Category in Clean: Conda Package Cache — "Conda package cache — future installs re-download packages."
- Location: `~/.conda/pkgs`
- Risk level: Medium risk — Safe to remove, but the tool that owns it re-downloads or rebuilds it on next use, which costs time and bandwidth. Listed, never pre-selected.
- Selected by default: no
- What Freshist does: Moves the selected items to the Trash, so you can undo. Nothing is deleted outright.

## What lives in the package cache

Conda, the package and environment manager behind Anaconda, Miniconda and Miniforge, never installs straight from the internet into an environment. It downloads each package as a `.conda` or `.tar.bz2` archive, extracts it into a package cache folder, then links files from there into every environment that needs it.

So a `pkgs` folder contains two copies of most things:

| Item | Example | Needed after install? |
|---|---|---|
| Archive | `numpy-2.1.0-py312h...conda` | No, only to re-extract |
| Extracted package folder | `numpy-2.1.0-py312h.../` | Yes, if environments link to it with symlinks; otherwise only to create new environments fast |
| `cache/` | Repodata index downloaded from channels | No, refetched |

### Where it is on a Mac

There is usually more than one cache. The [conda configuration docs](https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/settings.html) describe `pkgs_dirs` as a list, and by default the first writable entry is the `pkgs` folder inside your install, such as `~/miniconda3/pkgs`, `~/anaconda3/pkgs` or `~/miniforge3/pkgs`. `~/.conda/pkgs` is a per-user fallback, used when the install's own folder isn't writable (common with a shared or admin-owned install). Check which ones your setup really uses before cleaning anything.

## Why it gets so large

Data science stacks are heavy. A single environment with PyTorch, SciPy and Jupyter, or the full Anaconda distribution, pulls in gigabytes of packages, and conda keeps both the archive and the extracted copy. Every `conda update` adds new versions without removing the old ones. After a few months of creating and deleting environments, the cache often holds versions no environment uses.

## What happens if you clean it

`conda clean` is built to avoid breakage. According to the [conda clean reference](https://docs.conda.io/projects/conda/en/latest/commands/clean.html):

- `--tarballs` removes cached archives. Environments don't need them.
- `--packages` removes extracted packages no environment uses. It checks environments listed by `conda info --envs` for symlinks; environments conda doesn't know about aren't checked.
- `--all` combines tarballs, unused packages, the index cache, temp files and logs.
- `--force-pkgs-dirs` removes the writable package caches entirely. It's not part of `--all`, and the docs warn it breaks environments installed with symlinks back to the cache.

Conda's default is hard links, which keep working when the cache copy disappears. That's why deleting by hand is usually survivable, but you can't tell from Finder which method a given environment used.

## Find every package cache

```sh
conda info                         # look for "package cache" lines
conda config --show pkgs_dirs      # cache folders in priority order
du -sh ~/miniconda3/pkgs ~/.conda/pkgs 2>/dev/null
conda clean --all --dry-run        # what would be removed
```

Swap `~/miniconda3` for your install's path.

## Clean it with conda

```sh
conda clean --all
```

Add `-y` to skip the confirmation prompt. If you use mamba, it has its own `mamba clean` command for the same caches; check `mamba clean --help` for its flags.

## When a full cache helps

Keep the cache if you create environments often from the same packages: conda reuses extracted packages, so a new environment appears in seconds instead of minutes. Clean it after removing old environments, after a big update, or when the dry run shows gigabytes of tarballs. Python projects that use pip alongside conda have their own separate cache; for machine-learning downloads, see the [Hugging Face cache](/caches/huggingface/) and [PyTorch cache](/caches/torch-cache/) guides.

## Sources

- [conda docs: conda clean](https://docs.conda.io/projects/conda/en/latest/commands/clean.html)
- [conda docs: configuration settings, pkgs_dirs](https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/settings.html)
- [conda docs: managing packages](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html)

## Frequently asked questions

### Why do I have more than one pkgs folder?

Conda checks a list of package caches. The usual first one is pkgs inside your installation (for example ~/miniconda3/pkgs); ~/.conda/pkgs is used when that location isn't writable or is listed in pkgs_dirs. conda config --show pkgs_dirs prints the list in order.

### Does conda clean delete my environments?

No. Environments live in envs folders and are left alone. --packages only removes packages that no listed environment links to, and --all adds tarballs, the index cache and log files.

### Should I use conda clean --force-pkgs-dirs to free the most space?

Only if you know your environments were created with hard links or copies. The conda docs warn it breaks environments installed with symlinks back to the package cache, which is why it is left out of --all.

---

Canonical page: https://fresh.ist/caches/conda/
Official site: https://fresh.ist/ (fresh.ist only)
Generated: 2026-10-10
