How-To: Using Anaconda - Remove a Virtual Conda Environment via Command Line Interface

Question

How do I remove or delete a virtual conda environment from the Command Line?

 

Answer

Note:  To open an Anaconda Prompt in Windows or the Terminal in MacOS, see "How-To: Using Anaconda -  Launch a Virtual Conda Environment via Command Line Interface

1. From the Anaconda Prompt or Terminal command line (CLI) in the base environment, enter "conda info --envs" to list the current environments. The example environment to remove is highlighted. 

Example environment: my_test_env_3_13

Conda command prompt with command "conda info --envs" and example environment highlighted.

 

2. Remove (delete) the example environment.

Example environment: my_test_env_3_13

a. Enter "conda remove --name <environment_name> --all". Removal process begins...

command prompt window in base environment with "conda remove --name my_test_env_3_13 --all" as an example

b. First prompt to proceed, enter "y".

Removal process with prompt to proceed.

c. Second prompt to continue, enter "y".

Second prompt to continue with removal

 

3. Enter "conda info --envs" to list the environments. The example environment was removed.

Conda command prompt with command "conda info --envs" and example environment removed.

Print Article

Related Articles (5)

Install a Package in a Conda Environment via Command Line Interface
Remove a Virtual Conda Environment via Graphical Interface
Update a Package in a Conda Environment via Command Line Interface
Think of Conda as a way to create separate, private "workspaces" on your computer for different projects so their software settings don't get mixed up or cause errors. While other tools only handle one coding language, Conda is a "heavy hitter" that can manage almost any software component, making it the top choice for complex fields like Data Science and AI. By using these isolated spaces, you keep your computer stable and make it easy to share your exact setup with others.
Index of Miniconda How-To Articles for Virtual Conda Environments