Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (19 sloc) 738 Bytes
title date draft author categories tags thumbnail
Cleaning up conda environments
2019-08-23 00:00:00 +0100
false
Jacob Tomlinson
blog
conda
python
hygine
conda

Often when I'm developing or debugging in Python I end up creating throw away conda environments. They will be to test some package installation or combination of packages and once I've finished I will probably never use them again.

Usually I accidentally leave these hanging around and end up with a cluttered conda env list.

Here's a quick one liner to remove any environments with the words tmp, temp or test in them.

$ conda env list | grep 'tmp\|temp\|test' | awk '{ print $1 }' | xargs -n1 -d'\n' conda env remove -n
You can’t perform that action at this time.