1

Linux is already preinstalled with Python 2.7, however I installed Python 3.5.2 thinking that I need it but actually I don't. So I want to safely and completely remove it from the system, how can I do it?

I previously installed Python 3.5.2 using the commands below

wget https://www.python.orf.ftp/python/3.5.2/Python-3.5.2.tgz
tar -xvf Python-3.5.2.tgz
cd Python-3.5.2.tgz
./configure
make install
ls /usr/local/bin      //python 3.5.2 is stored at this location
dark_space
  • 179
  • 1
  • 2
  • 17
  • Unless you _really_ need the space, why go to the trouble of the uninstall (especially as down the road you'd realise you _do_ need Python3)? Just link `python` to the `python2.7` executable, and point your $PYTHONPATH and $PYTHONHOME to the correct values (http://stackoverflow.com/questions/7850908/what-exactly-should-be-set-in-pythonpath). – boardrider Sep 01 '16 at 14:02

1 Answers1

-1

There should be uninstall script but python really does not have it. If you didn't change any options from the firstplace( i mean config and make) you can do this one

//be careful with -rf//

sudo rm -rf /usr/local/bin/python3* /usr/local/bin/pydoc3 /usr/local/lib/python3.1 /usr/local/include/python3.1      /usr/local/lib/pkgconfig/python3.pc /usr/local/lib/libpython3.1.a
Zorig
  • 585
  • 1
  • 10
  • 26