Like stated in this question, my system broke too, when i tried to remove multiple versions of python installed. I now want to keep only one installation, that is the latest one, and also to be able to not have confusions making virtual envs and to install packages to always a single python version and not deal with legacy and lot more reasons. I want to retain only one python version, which is python 3.9. How do I do this without breaking my system?
This is how many python versions I have installed on my 20.04 ubuntu 64-bit desktop.
naveen@naveen-hp:~$ whereis python3
python3: /usr/bin/python3 /usr/bin/python3.8 /usr/bin/python3.9 /usr/lib/python3 /usr/lib/python3.8 /usr/lib/python3.9 /etc/python3 /etc/python3.8 /etc/python3.9 /usr/local/lib/python3.8 /usr/local/lib/python3.9 /usr/include/python3.8 /usr/share/python3 /usr/share/man/man1/python3.1.gz
naveen@naveen-hp:~$ whereis python
python: /usr/bin/python3.8 /usr/bin/python3.9 /usr/lib/python3.8 /usr/lib/python3.9 /usr/lib/python2.7 /etc/python3.8 /etc/python3.9 /usr/local/lib/python3.8 /usr/local/lib/python3.9 /usr/include/python3.8