Is there a way to uninstall multiple packages with pip?

I always use this:

pip freeze | xargs pip uninstall -y

Redirect the grep output to a new file and run.

 pip uninstall -r <file name>

works I think.

pip freeze | grep pyobjc > packages_to_remove.txt
sudo pip uninstall -y -r packages_to_remove.txt

Your command should actually work if you add the -y | --yes flag to pip :-)

-y, --yes Don't ask for confirmation of uninstall deletions.

Possibly:

% pip freeze | grep pyobjc-framework | xargs pip uninstall -y

Tags:

Python

Xargs

Pip