PIP is a great package manager. Pearhaps not the greatest manager but it does the job quite well. For a Python programmer, it's the only way to install PIP allow to install, upgrade and uninstall packages. But sometime we need to remove all packages, for example for a installer script.
For that, PIP has an option that allow to process an uninstallation without confirmations:
--yes. So if you ask all packages and then execute line by line the uninstaller, you'll removee all. For that we'll use the
xargs command. It allow to use a
\n as separator (see
Just type in a shell :
pip freeze | xargs pip uninstall -y
And all your PIP packages will be removed.