Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ubuntu, how do you remove all Python 3 but not 2

Tags:

python

ubuntu

I have recently get hold of a RackSpace Ubuntu server and it has pythons all over the place:

iPython in 3.5, Pandas in 3.4 &2.7, modules I need like pyodbc etc. are only in 2,7

Therefore, I am keen to clean up the box and, as a 2.7 users, keep everything in 2.7.

So the key question is, is there a way to remove both 3.4 and 3.5 efficiently at the same time while keeping Python 2.7?

like image 612
Wai Tong Avatar asked Dec 10 '15 10:12

Wai Tong


1 Answers

Removing Python 3 was the worst thing I did since I recently moved to the world of Linux. It removed Firefox, my launcher and, as I read while trying to fix my problem, it may also remove your desktop and terminal! Finally fixed after a long daytime nightmare. Just don't remove Python 3. Keep it there!

If that happens to you, here is the fix:

https://askubuntu.com/q/384033/402539

https://askubuntu.com/q/810854/402539

like image 186
Hazem Avatar answered Sep 27 '22 19:09

Hazem