1. Find where conda lives
Anaconda, Miniconda and Miniforge all install a base folder that contains conda itself, a pkgs folder with every package it has downloaded, and an envs folder with your environments. Installers commonly put it in your home folder under a name such as miniconda3, anaconda3 or miniforge3. conda info prints the exact base location, the package cache and the environment directories, so you do not have to guess.
Measure the whole install with one du command. conda normally hard-links files from the package cache into environments, and a single du run counts each hard-linked file once. Measuring pkgs and envs separately counts shared files twice, which makes the install look larger than it is and makes cleanup look more promising than it will be.
conda info
conda config --show pkgs_dirs
du -sh "$(conda info --base)"2. Preview what conda clean would remove
conda clean is the supported way to shrink the package cache, and --dry-run shows what it would do without doing it. The --all flag combines the individual targets listed below. Read the output for the size it would free before running the real command. conda config --show pkgs_dirs, from the first step, lists every package cache conda uses, in case more than one appears.
Packages that an environment still uses are not “unused”, so they stay. That is why the saving from conda clean is often modest on a Mac with many environments, and larger after you remove environments.
conda clean --all --dry-run- --index-cache: the cached channel index.
- --packages: unused packages in writable package caches.
- --tarballs: downloaded package archives.
- --tempfiles and --logfiles: leftovers that could not be deleted earlier, and log files.
- --all: all of the above.
3. Run it, and skip --force-pkgs-dirs
Run conda clean --all and confirm when asked; -y answers yes automatically, which is only worth adding once you trust the preview. Future installs download packages again as needed, so the cost is bandwidth and time rather than anything lost.
Do not use --force-pkgs-dirs, also written -f. conda’s documentation says it removes all writable package caches and warns that this will break environments with packages installed using symlinks back to the package cache. The ordinary --all route already removes what nothing uses. Running it every few months is plenty, since the cache only grows as you install.
conda clean --all4. Remove environments you no longer use
conda env list shows every environment and its path. For one you might need again, export a recipe first: conda env export --from-history records only the packages you asked for, which recreates more reliably on another machine or a later macOS. If the environment is active, run conda deactivate, then remove it with conda remove --name NAME --all.
Packages that only that environment used now count as unused, so run conda clean --packages again afterwards to release them from the cache. Leave the base environment in place; conda itself runs from it.
Environments created with --prefix inside a project folder have no name. conda env list shows them by path, and conda remove --prefix followed by that path and --all removes one. Deleting such a folder in Finder instead leaves conda’s record of it behind, so use the command.
conda env list
conda env export --name old-project --from-history > old-project.yml
conda deactivate
conda remove --name old-project --all
conda clean --packagespip inside conda, and removing conda entirely
Packages installed with pip inside a conda environment use pip’s own cache in ~/Library/Caches/pip, which conda clean does not touch; the pip guide covers it. Environments created by other tools, such as a project’s .venv folder, are separate from conda as well.
If you have moved away from conda altogether, follow the uninstall instructions for the installer you used rather than only deleting the base folder. conda init adds a block to your shell profile, such as ~/.zshrc, that points at that folder; remove the block too, or every new Terminal window reports an error.
Removing Anaconda entirely: the uninstall script
Anaconda’s documentation starts with conda deactivate, so the base environment is not active while it is removed, then runs uninstall.sh from the install folder. An install in /opt is a system-wide install and needs sudo -E, which runs the script with administrator rights while keeping your environment variables. Miniconda follows the same pattern with miniconda3 in the path.
Three optional flags remove more. --remove-caches deletes package and index caches. --remove-config-files takes user, system or all and deletes the matching .condarc files. --remove-user-data deletes user data such as ~/.conda. Anaconda’s Miniconda page advises keeping .condarc if you have custom settings and plan to reinstall, so leave out --remove-config-files in that case.
conda deactivate
~/anaconda3/uninstall.sh
sudo -E /opt/anaconda3/uninstall.sh
~/anaconda3/uninstall.sh --remove-caches --remove-config-files user --remove-user-dataAfter uninstalling: check your shell profile
conda init writes a block between the lines # >>> conda initialize >>> and # <<< conda initialize <<<. zsh, the default shell on current macOS, reads it from ~/.zshrc; bash uses ~/.bash_profile. Open those files in a text editor and confirm the block is gone. A leftover block often fails quietly and leaves a deleted folder at the front of PATH, so no error message does not prove the file is clean.
Then open a new Terminal window. The (base) prefix should be gone from the prompt, and which -a conda python3 should no longer list the old folder. python3 then usually resolves to /usr/bin/python3, which relies on Apple’s Command Line Tools, or to a Homebrew Python if you have one.
grep -n "conda initialize" ~/.zshrc ~/.bash_profile
which -a conda python3Common questions
Why does measuring conda's pkgs and envs folders separately overstate their size?
conda normally hard-links files from the package cache into environments, so a single du run on the whole install counts each shared file once. Measuring pkgs and envs separately counts shared files twice, making the install look bigger than it is.
What's the difference between conda clean --all and conda clean --force-pkgs-dirs?
conda clean --all only removes caches nothing else is using, so it is safe. --force-pkgs-dirs removes all writable package caches and can break environments whose packages are symlinked back to that cache, so it is best avoided.
Can I delete a conda environment folder in Finder instead of using conda remove?
No. Deleting the folder in Finder leaves conda's own record of that environment behind. Use conda remove with --name or --prefix and --all instead, so conda's records stay accurate.
Does conda clean also clear pip's cache inside a conda environment?
No. Packages installed with pip inside a conda environment use pip's own cache in ~/Library/Caches/pip, which conda clean does not touch; that cache needs pip's own commands to clear.
Does uninstalling Anaconda delete my conda environments?
Yes, uninstalling deletes those environments with no way back, so export any environments you might want to rebuild before running the uninstall.
Why does my Terminal still show (base) after I uninstalled Anaconda?
A leftover conda initialize block in your shell profile often fails quietly and can leave a deleted folder at the front of PATH. Check that the block between the conda initialize markers is fully removed from files like ~/.zshrc.
References & further reading
These guides combine the linked official guidance with ClearDisk’s documented behavior. Your files and app settings determine the right next step.