Conda environments are folders under ~/miniconda3/envs or ~/anaconda3/envs, each with its own Python and packages. Look first. An environment is safe to remove if no project uses it. Run conda env remove -n NAME rather than deleting the folder, and export the package list first if you may need it again.
- Path
~/miniconda3/envs and ~/anaconda3/envs- What it is
- Isolated Python (and other) environments created with conda
- Typical size
- Often 1 to 5 gigabytes per environment; machine-learning ones are larger
- Made by
- Conda (Miniconda or Anaconda)
- Safe to delete?
- Look first
- Comes back?
- Rebuildable only if you exported its package list; otherwise you have to remember what was installed
What is in this folder?
Every conda create makes a full environment folder. Packages are hard-linked from a shared pkgs cache where possible, but environments with big libraries such as PyTorch still take gigabytes. The base environment is the install itself and should not be removed.
Run conda env list to see all environments and where they are.
Is it safe to delete?
Often, but not automatically. An environment you made for a finished experiment is fine to remove. One you built by hand over weeks may be hard to reproduce if you did not record what you installed. That is why this is Look first, not Safe to clear.
The shared package cache in pkgs is a different story: conda clean --all clears unused cached packages safely.
How do I clear it by hand?
- Deactivate the environment you want to remove.
- Save its package list if you might want it back.
- Remove it by name.
conda env list
conda deactivate
conda env export -n NAME > NAME.yml
conda env remove -n NAME
conda clean --allDo not remove base, and do not delete an environment folder while a notebook or script is using it.
How do I stop it growing?
Use fewer, shared environments, remove ones when a project finishes, and run conda clean --all to drop unused cached packages.
How Clean House handles it
Clean House recognizes Conda environments, rates them Look first, and shows which project folder or notebook they may belong to when it can tell. It also lists the Conda pkgs cache of downloaded package archives separately, as something that downloads again.