189 words
1 minute
Conda

I. Conda Cache Cleanup — Free Up Disk Space#

Overview: Conda accumulates downloaded packages, extracted tarballs, and index caches over time. Cleaning these up frees disk space and reduces environment cruft — without touching any of your existing environments.

1. Check Conda Cache Usage (Optional)#

Terminal window
conda info
conda config --show pkgs_dirs
du -sh ~/miniconda3/pkgs 2>/dev/null

Terminal window
conda clean -a -y
FlagMeaning
-aall — cleans every type of cache and leftover
-yyes — auto-confirms without prompting

This removes:

  • Downloaded .tar.bz2 / .conda package archives
  • Extracted package caches
  • Index caches
  • Unused package caches

3. Also Clean pip Cache (If Used Inside Conda Envs)#

Terminal window
pip cache purge

4. Verify the Space Was Freed (Optional)#

Terminal window
du -sh ~/miniconda3/pkgs 2>/dev/null

Note: conda clean -a does not delete your environments — it only removes cached downloads. The trade-off is that the next time you install a package, conda may need to re-download it.

💡 One-line Takeaway
Run conda clean -a -y to safely reclaim disk space from package caches — your environments stay completely intact.
Conda
https://lxy-alexander.github.io/blog/posts/tools/conda/
Author
Alexander Lee
Published at
2026-02-03
License
CC BY-NC-SA 4.0