Skip to content

Instantly share code, notes, and snippets.

@avarun42
Created January 15, 2019 08:29
Show Gist options
  • Save avarun42/12b096d60ef00ffe3bd6a6bf4b501879 to your computer and use it in GitHub Desktop.
Save avarun42/12b096d60ef00ffe3bd6a6bf4b501879 to your computer and use it in GitHub Desktop.
Uninstall all pip-installed python packages from a conda environment
# Linux
conda list | grep '<pip>' | tr -s [:blank:] | cut -d' ' -f1 | xargs -d'\n' pip uninstall -y
# On macOS must install GNU findutils first in order to get custom delimiter functionality
# brew install findutils
# conda list | grep '<pip>' | tr -s [:blank:] | cut -d' ' -f1 | gxargs -d'\n' pip uninstall -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment