How to remove all packages installed by pip
·Mar 29, 2018·
1 min read
Sometimes you want to get rid of all python packages. There is a quick and easy way to do this. The command below will also remove the packages installed via VCS.
pip freeze | grep -v "^-e" | xargs pip uninstall -y
You may also use the command below. The command will also remake
virtualenv which includes the python executable, base libraries, etc.
virtualenv --clear __Your_Env_Name__
You should always back up the
pip list before clearing all packages.