If anything goes wrong with our installation of phpmyadmin or PHP or Apache2 or MariaDB and we want to remove anyone of them we could use bellow commands as needed.
REMOVE phpmyadminsudo apt-get purge phpmyadmin
ORsudo apt-get remove phpmyadmin
REMOVE phpsudo apt-get purge php.*
REMOVE apache2
sudo service apache2 stop
sudo apt-get remove apache2*
sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common
sudo apt-get autoremove