Discussions

rhel - Unable to install/uninstall pip - Linux - Unix & Linux Stack Exchange
When i try to uninstall pip, I am getting the error below $python2.7 -m pip uninstall pip Traceback (most recent call last): File "/usr/lib64/python2.7/runpy.py", line 162, in More on unix.stackexchange.com
๐ŸŒ unix.stackexchange.com
February 26, 2021
linux - how to uninstall pip from /usr/local/bin/ - Unix & Linux Stack Exchange
we want to uninstall the pip that located on path - /usr/local/bin/pip when we did pip uninstall we get /usr/local/bin/pip uninstall pip Traceback (most recent call last): File "/usr/local/... More on unix.stackexchange.com
๐ŸŒ unix.stackexchange.com
easy install - How to cleanly remove pip that is installed by using easy_install? - Stack Overflow
If I used sudo easy_install pip on my OS X Lion 10.7.4, how do I cleanly remove it? After the installation, I also did pip install --upgrade setuptools Here is the output: mac:~ usr$ sudo easy_in... More on stackoverflow.com
๐ŸŒ stackoverflow.com
October 18, 2015
linux - can't remove python pip - Stack Overflow
i've installed both python3 and python it used to work everything perfect but today i encountered several issues with pip then i tried to uninstall it and install it again i've made sudo apt-get More on stackoverflow.com
๐ŸŒ stackoverflow.com
๐ŸŒ
RoseHosting
rosehosting.com โ€บ home โ€บ pip uninstall | uninstall a pip package
Pip Uninstall: Uninstall Pip Package | RoseHosting
December 19, 2022 - If you followed one of our previous tutorials about how to install and use pip on Ubuntu 16.04 or how to install and use pip on CentOS 7 and you installed some Python packages that you donโ€™t want to use anymore, you can easily uninstall them using pip.
๐ŸŒ
Stack Exchange
unix.stackexchange.com โ€บ questions โ€บ 636475 โ€บ unable-to-install-uninstall-pip-linux
rhel - Unable to install/uninstall pip - Linux - Unix & Linux Stack Exchange
February 26, 2021 - $python2.7 -m pip uninstall pip Traceback (most recent call last): File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code exec code ...
๐ŸŒ
Stack Exchange
unix.stackexchange.com โ€บ questions โ€บ 694497 โ€บ how-to-uninstall-pip-from-usr-local-bin
linux - how to uninstall pip from /usr/local/bin/ - Unix & Linux Stack Exchange
we want to uninstall the pip that located on path - /usr/local/bin/pip when we did pip uninstall we get /usr/local/bin/pip uninstall pip Traceback (most recent call last): File "/usr/local/...
๐ŸŒ
PhoenixNAP
phoenixnap.com โ€บ home โ€บ kb โ€บ sysadmin โ€บ how to install pip on centos and rocky linux
How to Install Pip on CentOS and Rocky Linux
November 5, 2024 - Confirm you want to proceed by typing y. The output displays you successfully uninstalled Pip. On the other hand, if you installed Pip from the EPEL repository, remove it with: ... Press y to verify. You should see a message as in the example below. ... If you applied the steps described in this article, you have a working installation of Pip on CentOS or Rocky Linux.
Find elsewhere
๐ŸŒ
Code2care
code2care.org โ€บ home โ€บ q โ€บ how to uninstall pip python packages
How to uninstall pip Python packages | Code2care
May 16, 2023 - Article demonstration how you can remove a Python module using the pip uninstall command on the terminal or command line.
Top answer
1 of 2
2
  • (2) Are from snap core package and you have 3 versions installed: 6130, 6259, 6350

    They don't interfere with system wide programs, they are only used for other snap packages.

  • (3) It is a locally installed Python2, that will take priority and better to get rid of it if you don't need it.

    If you still have the downloaded source, use the uninstall command. If not then you have to make manual remove.

2 of 2
0

apt-get / apt (side-note: no actual difference of the two, see What is the difference between apt and apt-get?) is independent from the individual packages you might install (which is logical at second sight). See apt-get install for different python versions. That is on purpose.

pip2.7

+++EDIT: It seems that the solution for pip does not work, since I got a "Permission denied" after really executing the example commands.+++ Also see this that has no answer.

If you want to uninstall an old pip, you should use

python2.7 -m pip uninstall pip for getting rid of pip2.7 (for example). and yes, "pip2.7 can uninstall pip2.7", this as a proof:

~/myfoldername $ pip -V
pip 20.3.1 from /home/myusername/myfoldername/venv/myvirtualenvironment/lib/python2.7/site-packages/pip (python 2.7)

~/myfoldername $ python2.7 -m pip uninstall pip 
DEPRECATION: Python 2.7 reached the end of its life on January 1st,
2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Found existing installation: pip 20.3.1 Uninstalling pip-20.3.1:   
Would remove:
    /home/myusername/myprojectname/venv/myvirtualenvironment/bin/pip
    /home/myusername/myprojectname/venv/myvirtualenvironment/bin/pip-2.7
    /home/myusername/myprojectname/venv/myvirtualenvironment/bin/pip2
    /home/myusername/myprojectname/venv/myvirtualenvironment/bin/pip2.7
    /home/myusername/myprojectname/venv/myvirtualenvironment/lib/python2.7/site-packages/pip-20.3.1.dist-info/*
    /home/myusername/myprojectname/venv/myvirtualenvironment/lib/python2.7/site-packages/pip-20.3.1.virtualenv
    /home/myusername/myprojectname/venv/myvirtualenvironment/lib/python2.7/site-packages/pip/*
Proceed (y/n)? n 

pip3.7

~/myprojectname $ python3.7 -m pip uninstall pip 
Found existing installation: pip 20.3.3 Uninstalling pip-20.3.3:   Would remove:
    /home/myusername/.local/bin/pip
    /home/myusername/.local/bin/pip3
    /home/myusername/.local/bin/pip3.7
    /home/myusername/.local/lib/python3.7/site-packages/pip-20.3.3.dist-info/*
    /home/myusername/.local/lib/python3.7/site-packages/pip/*
Proceed (y/n)? n

python2.7

Of course, that is not possible for python itself, you need: sudo apt-get remove python2.7

~/myfoldername $ sudo apt-get remove python2.7
0 upgraded, 2 newly installed, 402 to remove and 1 not upgraded.
Need to get 97,3 kB of archives.
After this operation, 387 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
 ?] n
Abort.
๐ŸŒ
MTU Service Desk
servicedesk.mtu.edu โ€บ TDClient โ€บ 1801 โ€บ Portal โ€บ KB โ€บ ArticleDet
Installing, uninstalling, or upgrading Python modules using Pip (Linux)
Use the command 'pip3 uninstall <package-name>'. Depending on how the package was installed, you may need to replace the pip3 command with the version of Pip that was used to originally install the package.
๐ŸŒ
Note.nkmk.me
note.nkmk.me โ€บ home โ€บ python
How to Use pip (Install, Update, Uninstall Packages) | note.nkmk.me
April 18, 2025 - Multiple packages can be uninstalled at the same time. $ pip uninstall <package-name1> <package-name2> <package-name3> ...
๐ŸŒ
Reddit
reddit.com โ€บ r/archlinux โ€บ removing pip packages from root after using with sudo
r/archlinux on Reddit: Removing pip packages from root after using with sudo
May 18, 2021 -

Hey guys, i have a question

i didn't realize that using sudo with pip was bad practice, and i used it a long time ago so i couldn't even remember what i had installed with it (i had some stuff installed as --user and some as root). I wasn't sure what to do so i ended up completely deleting /usr/lib/python2.7 and 3.9, afterwards many of my programs refused to work, so i ended up basically reinstalling every package in my system, and its working good so far.

Now, did deleting /usr/lib/python* get rid of all the pip files, or would i still be missing something?.

1 MONTH LATER EDIT: about a month later, i was reinstalling the same pip packages i had before but without using pip, and pacman complained about files already existing, so i had to delete some python files from /usr/bin i believe

๐ŸŒ
Linuxize
linuxize.com โ€บ home โ€บ python โ€บ how to install pip on centos 7
How to Install Pip on CentOS 7 | Linuxize
February 20, 2019 - You have successfully installed pip on your CentOS 7 system and you learned how to easily install and uninstall Python modules with pip.