SiftMac
Is it safe to delete? · Package caches · Updated 21 November 2026

Is it safe to delete conda’s pkgs folder and old environments?

By Mohit Nippanikar, who makes SiftMac

The short answer
On this page
  1. What pkgs and envs hold
  2. Where they are
  3. How big they are, without counting twice
  4. How to clear it
  5. What happens afterwards
  6. Questions

1. What pkgs and envs hold

conda downloads each package as an archive, unpacks it into its package cache, pkgs, and then links the files into every environment that uses it. When the cache and the environments are on the same disk, those are hard links: one file on disk with two names. A package shared by five environments takes its space once.

Updates and new environments keep adding to pkgs; conda clean is how it shrinks.

2. Where they are

Both sit inside conda’s base folder, which depends on how you installed it. Miniconda’s command-line installer proposes ~/miniconda3, its graphical installer uses /opt/miniconda3, and Miniforge and Anaconda use their own folders. Ask conda:

conda info --base
conda config --show pkgs_dirs envs_dirs
conda env list

3. How big they are, without counting twice

Because environments and pkgs share hard-linked files, measuring pkgs alone counts every package in full, including those no cleanup would remove. Measure the whole base folder for the real total, pkgs for an upper bound, and let conda tell you what a clean would free:

du -sh "$(conda info --base)"
du -sh "$(conda info --base)/pkgs"
conda clean --all --dry-run

The dry run lists exactly what conda clean --all would delete, so it’s the honest number.

4. How to clear it

  1. Close Jupyter, editors and terminals that are using a conda environment.
  2. Preview, then clean. conda clean --all removes the index cache, unused cached packages, tarballs, temporary files and log files.
  3. Leave out --force-pkgs-dirs (-f). It isn’t part of --all: it removes every writable package cache, and conda’s docs warn it breaks environments installed with symlinks back to that cache.
conda clean --all --dry-run
conda clean --all

conda only checks environments it knows about. Ones that conda info --envs doesn’t list aren’t checked for links back to the cache, so make sure yours show up before cleaning.

Old environments

Environments are yours: conda can’t rebuild one unless you saved what was in it. For each one you might want again, export it, then remove it:

conda env export --name old-env --from-history > old-env.yml
conda remove --name old-env --all

--from-history saves only the packages you asked for, which makes a file that works across platforms. To bring it back later, conda’s docs recommend conda create --file old-env.yml; the older conda env create --file old-env.yml still works. After removing environments, run conda clean --all again, since packages only they used are now unused.

5. What happens afterwards

Questions

Will conda clean --all break my environments?

No. It removes packages no environment uses, plus archives, caches and logs. The option that can break environments, --force-pkgs-dirs, isn’t included in --all.

Why did conda clean free less than the size of pkgs?

Most of pkgs is shared with your environments through hard links. Those files stay because environments still use them; only packages no environment links to are removed.

Can I just delete the pkgs folder in Finder?

Don’t. Environments installed with symlinks back to the cache stop working, and conda loses track of what it has. conda clean does the job safely.

What’s the difference between --packages and --tarballs?

--tarballs removes only the downloaded archives; --packages removes unpacked packages that no environment uses. --all includes both.

How SiftMac handles it. SiftMac leaves conda’s folders to conda: it doesn’t clear pkgs or remove environments, because only conda knows which packages its environments share. Its space map can show how big the conda folder and each environment in it are, so you can see which ones to export and remove.

Download SiftMac · scanning is free, and so is your first 2 GB of cleaning · See how it works