sudo dpkg --force-depends --purge libpython3.9-minimal
Or
sudo dpkg --remove --force-depends python3.6 python3.6-minimal libpython3.6-minimal libpython3.6-stdlib
https://askubuntu.com/a/1069440
Что установлено
dpkg -l|grep python
ls /usr/bin/ | grep python
Remove the python
sudo apt-get purge --auto-remove python
sudo apt-get purge python3.6
$ sudo apt-get remove --auto-remove python3.6
https://linuxize.com/post/how-to-install-python-3-9-on-ubuntu-20-04/
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.9
Create symlinks(if wanted)
sudo ln -s /usr/bin/python3.9 /usr/bin/python3
sudo ln -s /usr/bin/python3 /usr/bin/python
Alternatively create symlinks with
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
update-alternatives --install /usr/bin/python python /usr/bin/python3 1