Skip to content Skip to sidebar Skip to footer

Conda Install -n Base --revision 1 Doesn't Clean Up Pypi Packages

I attempted cleaning up my base (mini)conda environment by installing revision 1 of the base environment. $ conda install -n base --revision 1 For reference, here is what revision

Solution 1:

There is nothing in the Conda CLI to handle this, but pip uninstall also works with a requirements.txt, which could easily be made with this output. For example,

conda list | awk '$4~/^pypi$/ { print $1 }' > requirements.txt
pip uninstall -r requirements.txt

or if you want a one liner

# make sure you have the right environment activated!
pip uninstall -r <(conda list | awk '$4 ~ /^pypi$/ {print $1}')

There is a -y flag for pip uninstall, but I would review the operation, just to double check it is removing from where you expect.

Post a Comment for "Conda Install -n Base --revision 1 Doesn't Clean Up Pypi Packages"