How Uninstall pip and python

161,946

Solution 1

In order to remove it type:

sudo apt-get remove python-pip python-dev

If you're not sure which switch to use, you can add the --help switch to almost if not every Linux command to get details about the command.

Example:

apt-get --help

Solution 2

to fully remove those you can use sudo apt purge python-pip python-dev <-- this will delete all the files/directories/binaries created by that package

Share:
161,946

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    I wanted to install version 3 of python and pip but instead issued

    sudo apt-get install python-pip python-dev
    

    how do I uninstall python and pip, I tried sudo apt-get uninstall but did not work, what is the correct command?

    • Admin
      Admin about 7 years
      Just a note, on ubuntu you have python-pip and python3-pip, but they have different commands anyway. One is pip and the other is pip3. As such installing python-pip and python-dev is not detrimental.
  • Kyle Bridenstine
    Kyle Bridenstine almost 6 years
    If you're on an aws ec2-instance you have to use yum. Anyone know the command using yum and not apt-get?
  • Itai Ganot
    Itai Ganot over 5 years
    @KyleBridenstine this is partially right, if you use aws ami of Amazon Linux then since it is based on Centos, then you use yum. The equivalent in Yum is: “yum remove package_name”.
  • Drasius
    Drasius over 4 years
    "sudo yum remove python-pip python-dev" works fine for CentOS 7