How to uninstall python 3.8 from Ubuntu after deleting the folder Python-3.8.0 using "rm -rf"?

I got python3.8 when I did apt-get update on ubuntu 20.

These two steps removed it for me.

sudo apt-get -y purge python3.8
sudo apt-get -y autoremove

In Dockerfile you have to remove sudo.

apt-get -y purge python3.8
apt-get -y autoremove

I reinstalled the package using the same procedure:

wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz
tar xzf Python-3.8.0
cd Python-3.8.0
sudo ./configure --enable-optimizations
sudo make altinstall

And added these lines:

sudo apt update
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget
sudo make altinstall

Then I used METHOD 2 of this webpage: https://stackoverflow.com/questions/1439950/whats-the-opposite-of-make-install-i-e-how-do-you-uninstall-a-library-in-li

But I made some modifications.

sudo apt -y install checkinstall
sudo checkinstall

I said "no" to ALL the questions. And then I used this command:

dpkg -r python

FINAL RESULT

enter image description here

I deleted the Python3.8 folder:

sudo rm -rf Python-3.8.0