What is the easiest way to remove all packages installed by pip?
I'm trying to fix up one of my virtualenvs - I'd like to reset all of the installed libraries back to the ones that match production.
Is there a quick and easy way to do this with pip?
You can run the following command to remove all the packages pip uninstall all it saves your virtual environment:-
pip freeze | xargs pip uninstall -y
To remove all the packages at the same time you can also use the following piece of command as it will work in all the OSs:-
pip uninstall -r requirements.txt -y