Conda remove all environments (except root)

Mac/Linux based systems could remove all environments like this.

for i in `conda env list|awk '{print $1}'|egrep -v 'base|#'|tr '\n' ' '`;do echo $i;conda env remove --name $i;done

Removing all directories inside the envs subdirectory that resides inside conda does the job. This is generally in your user folder ~.

~\.conda\envs\

Not the most elegant answer. But I would just copy the names of all the environments from conda info --envs. Then make a bash (or .bat for windows) file with all the commands you need e.g...

conda remove -n env_name_1 --all -y
conda remove -n env_name_2 --all -y
conda remove -n env_name_3 --all -y
conda remove -n env_name_4 --all -y
conda remove -n env_name_5 --all -y

Or just copy and paste that into the terminal and it will sort you out!

If I was a little bash (or .bat) wizard (or could be bothered to do some googling) you could pipe the output from conda info --envs to generate the conda remove ... commands.