Reference:
https://uoa-eresearch.github.io/eresearch-cookbook/recipe/2014/11/20/conda/
I\'ve run the following commands to install conda and create a virtual env
When the conda environment was previously removed, but the actual directory still exists (for some reason), then the "conda env remove -n ENV1" will do nothing:
$ conda-env list
# conda environments:
#
base * /home/nmanos/miniconda
test-env /home/nmanos/miniconda/envs/test-env
$ conda-env remove -n ENV1
# Nothing was removed (exit code zero)
$ ls /home/nmanos/miniconda/envs/ENV1
bin conda-meta etc go
# Directory still exists
So you can remove the actual ENV1 directory, as follow:
$ ENV_BASE=$(conda-env list | awk '/base/ { print $NF }')
$ echo $ENV_BASE
/home/nmanos/miniconda
$ rm -rf "$ENV_BASE/envs/ENV1"