The conda env remove command permanently deletes a named Conda environment and all its packages. Understanding the correct syntax and flags prevents errors and ensures clean removal.

Full Command Syntax

conda env remove -n ENVIRONMENT_NAME
# or with full flag
conda env remove --name ENVIRONMENT_NAME

# Remove by path
conda env remove -p /path/to/environment
conda env remove --prefix /path/to/environment

Common Usage Examples

# Remove environment named 'data-science'
conda env remove -n data-science

# Remove environment at a specific path
conda env remove -p ~/conda-envs/myproject

# List environments before removing to confirm name
conda env list
conda env remove -n exact_environment_name

What the Command Does

The remove command deletes the entire environment directory, including all installed packages, binaries, and shared libraries. It also removes the environment from Conda’s registry so it no longer appears in conda env list. The operation is atomic — either the entire environment is removed or nothing is changed if an error occurs.

Frequently Asked Questions

What is the difference between conda remove and conda env remove?

conda remove package_name removes a single package from the currently active environment. conda env remove -n env_name removes an entire environment and all its contents. They are completely different operations — the first removes one package, the second deletes the entire environment.