How to make a complete removal of Python 3.9 in Ubuntu 16.04?

I installed Python 3.9 on my Ubuntu 16.04 LTS system, in addition to the default 2.7 and 3.5 that come with the system. I can call it perfectly by typing python3.9, and also use pip3.9 commands.

I want to remove it form the system, for reinstalling it, or even and earlier version of python instead.

I tried already sudo apt-get remove python3.9 , sudo apt-get autoremove python3.9, sudo apt-get purge python3.9, sudo apt-get remove --purge python3.9 and sudo apt-get autoremove --purge python3.9. None seems to make effect.

When I call python3.9 it comes:

Python 3.9.0 (default, Nov 14 2020, 00:35:31)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

How could I fix that? Thx


in case you still need it.

first of all, it's never advisable to uninstall python. check for instance this link.
having said this, Ubuntu 16.04 does not depend (wasn't build) on Python 3.9 (check this out, for instance). thus, and in principle you shouldn't be having problems fully uninstalling it... as it was my case.

i had no troubles following these steps; which for you/me would be something like: sudo apt-get clean sudo apt-get autoremove --purge sudo apt-get remove python3.9 sudo apt-get autoremove

good luck!
  1. Install synaptic using

    sudo apt install synaptic
    
  2. Open synaptic

    enter image here

  3. Search for "python 3.9"

    enter image here

  4. Right click on "python 3.9" and Select "mark for complete removal"

    enter image here

  5. Click apply