How to uninstall python?

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
noodle7571
New to forums
New to forums
Posts: 2
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sun Sep 13, 2020 12:20 pm

How to uninstall python?

Post by noodle7571 »

I need to use python3 but python2.x is still being used after I have installed python3. How would I go about uninstalling python2.x from my ubuntu VPS.
Naleksuh
This is my homepage
This is my homepage
Posts: 298
Joined: Thu Jul 25, 2019 12:35 am

Re: How to uninstall python?

Post by Naleksuh »

What do you mean by "still being used" By the python command? Python 3.x uses the python3 command, so it should not be necessary to uninstall Python 2. However, it can still be removed via the apt purge command (depending on what version of python 2 you had).
noodle7571
New to forums
New to forums
Posts: 2
Joined: Sun Sep 13, 2020 12:20 pm

Re: How to uninstall python?

Post by noodle7571 »

I have python 2.7.17 on the system.
User avatar
Decicus
Compulsive poster
Compulsive poster
Posts: 65
Joined: Thu Dec 05, 2013 1:55 am
Location: Norway
Contact:

Re: How to uninstall python?

Post by Decicus »

Is there anything that prevents you from running

Code: Select all

python3 filename.py
Removing Python 2 probably wouldn't help anyways, as the "python" alias would most likely not point to python3 after removing 2.
Post Reply