How to remove all packages installed by pip

Hey, y’all 🖖🏽 I am a passionate self-taught developer, open-source advocate, and tech enthusiast with a hands-on approach to problem-solving and an unending thirst for knowledge. Anything and everything classified as technology fascinate me.
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.






