How to Uninstall phpMyAdmin in Ubuntu Server
Following tutorial explains how to uninstall phpMyAdmin on Ubuntu 18.04 Server, you can also use following method on any previous Ubuntu release. We will also discuss how to enable and disable phpMyAdmin without uninstalling the phpMyAdmin package.
To uninstall phpMyAdmin in Ubuntu, open the terminal and run the following set of commands:
sudo apt-get remove phpmyadmin
sudo apt-get purge phpmyadmin
sudo apt-get autoremove
The "apt-get remove phpmyadmin" command will uninstall the phpmyadmin package, the purge command will remove configuration files related to Ubuntu phpMyAdmin and the autoremove command will uninstall all the dependency packages that are no longer required.
If you want to reinstall phpMyAdmin on Ubuntu, run:
sudo apt-get update
sudo apt-get install phpmyadmin
Disable phpMyAdmin without uninstalling
If you just want to disable access to the phpMyadmin, you could simply disable the phpMyAdmin without uninstalling it.
sudo a2disconf phpmyadmin
sudo systemctl reload apache2
To re enable phpMyAdmin, run:
sudo a2enconf phpmyadmin
sudo systemctl reload apache2
You can find Ubuntu Apache phpMyAdmin configuration file under the /etc/apache2/conf-available/phpmyadmin.conf.