Tips On Fixing “CondaEnvironmentError: cannot remove current environment. deactivate and run conda remove again” Error


Conda is the package manager of Python, which helps manage the dependencies of the packages. Sometimes, when you try to uninstall all your package dependencies, you get an error message like “CondaEnvironmentError: cannot remove current environment. deactivate and run conda remove again”. 

Here are some tips which might help you in fixing this issue.

How To Fix “CondaEnvironmentError: cannot remove current environment. deactivate and run conda remove again” Error?

When attempting to remove the Conda environment, you may encounter the following problem: 

CondaEnvironmentError: cannot remove current environment. deactivate and run conda remove again

To fix “CondaEnvironmentError: Current environment cannot be removed. Remove conda and disable it again.” error, firstly, ensure that the environment is inactive. Then, run conda env remove -n ENV NAME to delete ENVIRONMENT or conda env remove –name ENVIRONMENT

Then, in a terminal window or an Anaconda Prompt, run conda info –envs to make that the environment was deleted. The second option is utilizing the conda deactivate command to turn off the environment. You may delete the environment with this command: conda env removal -n env name.

Method 1: Ensure Your Environment Is Inactive.

First, ensure the environment is no longer active, then utilize this command to delete ENVIRONMENT.

conda env remove -n ENV_NAME


conda env remove --name ENVIRONMENT

Next, check if the environment has been deleted in an Anaconda Prompt or a terminal window.

conda info --envs

Method 2: Deactivate And Then Eliminate

To begin, use this command to disable the environment.

conda deactivate

With this command, you may now delete the environment.

conda env remove -n env_name


We hope you enjoyed our article about “CondaEnviromentError: cannot remove current environment. deactivate and run conda remove again” Error. We know that this error can be frustrating to deal with, so we hope that our information has helped you fix it. If you have any other questions or concerns about working with Conda, please leave a comment below. Thank you for reading; we are always excited when one of our posts can provide useful information on a topic like this!

Related posts

  • Solving the “AttributeError: module ‘tensorflow’ has no attribute ‘Session’” in Tensorflow 2.0
    Industry 4.0 entails the development of many different technology fields. Among them can be mentioned AI – Artificial Intelligence. Artificial intelligence has been contributing a lot of resources to human life. The explosion of AI, of course, led to the emergence of machine learning and deep learning. Because to make machine learning easier, humans have […]
  • The easy way to handle “Jasmine.createSpyObj with properties”
    Are you having problems with “Jasmine.createSpyObj with properties” in your project? You have researched and tried to fix but still not getting the desired result. Don’t get discouraged about it! This is also part of our research, so check out the workaround below! What is “Jasmine.createSpyObj with properties”? If you haven’t figured out how the […]
  • How to solve “Maven error: package org.junit does not exist”
    During the project, you realized a rather headache in the development of the project that is the management of the library used in the project. Imagine if in a project we develop using a lot of 3rd party libraries (selenium, testng, ..), one fine day your libraries need to upgrade versions, or add, or delete […]
  • How to deal with error “Java file outside of source root” in IntelliJ
    Java is one of the most popular programming languages used to create Web-based applications and platforms, similar to C++, but with advanced features. Java is an independent platform because the Java Compiler converts the source code to bytecode. It is designed to allow developers to write code that runs on any machine. One of the […]
  • Amazing Tricks To Fix Urlopen Error [Ssl: Certificate_verify_failed] Certificate Verify Failed
    We rely on technology to do just about everything in today’s world. We use it to communicate with others, stay up-to-date on the news, and make purchases.  So when something goes wrong with our technology, it can be very frustrating. One such issue is the “urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed” message.  This blog […]
Scroll to Top