Reputation: 858
I am using Windows 10 (all commands run as administrator). I created an environment called myenv. Then I used
conda env remove -n myenv
Now, if I try
conda info --envs
I only see the base environment. However, if I try
conda activate myenv
I'm still able to activate it! I think because under the folder envs, there is still a folder with the name myenv there which doesn't get deleted.
How do I delete the environment for good?
Upvotes: 7
Views: 12709
Reputation: 11
In addition to the first command in the question posted, I had to complete one additional step to completely remove the environment. I had to go to the folder where the environment was stored (e.g. C:\Users*username*.conda\envs\ on a windows machine) and remove the folder with the same name as the environment I deleted. After this second step, I was able to reuse the environment name without any errors.
Upvotes: 0
Reputation: 19776
Command-line options can only go so far, unless you get very specific; perhaps the simplest approach is to delete things manually:
"D:\Anaconda\"
envs
, delete environment of interest: "D:\Anaconda\envs\myenv"
Are you done? Not quite; even while in myenv
, conda will still sometimes install packages to the base environment, in "D:\Anaconda\pkgs\"
; thus, to clean traces of myenv
,
Delete packages installed to myenv
that ended up in "D:\Anaconda\pkgs\"
(If above don't suffice) Anaconda Navigator -> Environments -> myenv -> Remove
Note: step 3 is redundant for the goal of simply removing myenv
, but it's recommended to minimize future package conflicts.
Upvotes: 4