
Cleaning up conda environments
1 minute read
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
Spotted a mistake in this article? Why not suggest an edit!
I feedback.
Let me know what you think of this article on twitter @_jacobtomlinson or leave a comment below!
Let me know what you think of this article on twitter @_jacobtomlinson or leave a comment below!
comments powered by Disqus