Explore Courses Blog Tutorials Interview Questions
0 votes
in Python by (47.6k points)

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?

1 Answer

0 votes
by (106k points)

You can run the following command to remove all the packages installed by pip it saves your virtual environment:-

pip freeze | xargs pip uninstall -y

To remove all the packages at the same time you can use the following piece of command this command will work in all the OSs:-

pip uninstall -r requirements.txt -y

Related questions

0 votes
1 answer
+2 votes
3 answers
0 votes
1 answer

Browse Categories