Is there a way to uninstall multiple packages with pip?

wh1tney picture wh1tney · Feb 23, 2012 · Viewed 16.2k times · Source

I am attempting to remove all of the installed "pyobjc-framework"-prefixed packages. I have tried the following:

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

but this barfs because each pip uninstall requires confirmation (perhaps a way to bypass this would be a solution).

Please help before I have to break down and uninstall each of these manually! Nobody wants that.

Answer

jdi picture jdi · Feb 23, 2012

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