Back to top
Edit this page
Toggle table of contents sidebar
Usage#
Unix/macOS
python -m pip uninstall [options] ... python -m pip uninstall [options] -r ...
Windows
py -m pip uninstall [options] ... py -m pip uninstall [options] -r ...
Description#
Uninstall packages.
pip is able to uninstall most installed packages. Known exceptions are:
Pure distutils packages installed with
python setup.py install
, which leave behind no metadata to determine what files were installed.Script wrappers installed by
python setup.py develop
.
Options#
-r,--requirement #Uninstall all the packages listed in the given requirements file. This option can be used multiple times.
-y, --yes#Don’t ask for confirmation of uninstall deletions.
--root-user-action #Action if pip is run as a root user. By default, a warning message is shown.
Examples#
Uninstall a package.
Unix/macOS
$ python -m pip uninstall simplejson Uninstalling simplejson: /home/me/env/lib/python3.9/site-packages/simplejson /home/me/env/lib/python3.9/site-packages/simplejson-2.2.1-py3.9.egg-info Proceed [Y/n]? y Successfully uninstalled simplejson
Windows
C:\> py -m pip uninstall simplejson Uninstalling simplejson: /home/me/env/lib/python3.9/site-packages/simplejson /home/me/env/lib/python3.9/site-packages/simplejson-2.2.1-py3.9.egg-info Proceed [Y/n]? y Successfully uninstalled simplejson
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
DoTheEvo opened this issue
Jun 24, 2014· 8 comments
Labels
auto-locked
Outdated issues that have been locked by automationComments
removing, uninstalling pip
get-pip.py from here
Cant find anything on this subject.
Might be helpful for the documentation as well
maniac-tech, shivamMg, Ankita-Das, dpaluy, MystaMax, rojobuffalo, sngyai, gmpify, pavelkaps, ozkalt, and 7 more reacted with thumbs up emoji
python -m pip uninstall pip setuptools
vyablonskyy, maniac-tech, gitfineon, nzt4567, miepstei, bmaddy, ostrbor, zry656565, TheXaver, MattAlex151, and 54 more reacted with thumbs up emojiadamhrosenberg, nikhilmishradevelop, tonystark12, villasenor, OmriNiri, and harshvardhanmalpani reacted with hooray emojinihal111, adamhrosenberg, znezniV, tonystark12, villasenor, harshvardhanmalpani, and akubala reacted with heart emoji
mlzxy, AlexisDanizan, tetafro, lukewpatterson, huangdenghe, lipis, shelkmike, DmACKGL, unabl4, moffpage, and 5 more reacted with thumbs up emojimonajalal, ecthiender, eve-p, Lameck1, and takedawilliam reacted with heart emoji
And if is pip is broken? Can I remove some folders and reinstall it?
How
is it broken ? python -m pip.__main__
does not work ?
You could download //bootstrap.pypa.io/get-pip.py
and run python get-pip.py --ignore-installed
to reinstall pip.
vyablonskyy, misg, jarvin95, Slooowpoke, cpwr, dackota, herkyl, helmutmigge, JBerghof, savemuri, and mislitzer reacted with thumbs up emojiherkyl, Anil2612, savemuri, and sprakriti reacted with hooray emojisavemuri reacted with heart emoji
No, nothing work. The only way was delete the /usr/lib/python2.7/site-packages
folder, and then try python get-pip.py
again. But in my case I am installing all packages again. Thanks for the tip! Next time I try it before run rm -rf
stuff... this time was too late, hhehehehe
@jonathanpmartins Yeah,site-package removal method worked for me too.my pip was broken somehow and get-pip
kept saying that pip is already installed instead of doing a fresh installation,Only when the folder was removed the get-pip allowed to reinstall the pip from scratch. This method works when I can't go for 'pip uninstall pip' since pip was said to be installed by get-pip.py but broke,so how could I use pip to uninstall pip.
This was the only option I was left with.
lock bot locked as resolved and limited conversation to collaborators
Jun 3, 2019Labels
auto-locked
Outdated issues that have been locked by automation