If you have previously installed phpMyAdmin on your Ubuntu system and now wish to remove it, this guide will show you how to uninstall phpMyAdmin step by step. We will cover both manual removal and using package managers for a complete uninstallation process.
Uninstalling phpMyAdmin using package managers
First, we will cover how to uninstall phpMyAdmin using package managers like apt or apt-get.
Step 1: Update package lists
Start by updating the package lists for upgrades and package removals:
sudo apt update
Step 2: Uninstall phpMyAdmin
Now, you can proceed to uninstall phpMyAdmin using the following command:
sudo apt remove phpmyadmin
Confirm the uninstallation when prompted, and phpMyAdmin will be removed from your system.
Manually removing phpMyAdmin
If you have installed phpMyAdmin manually, you can follow these steps to remove it.
Step 1: Locate phpMyAdmin installation
Find the directory where phpMyAdmin was installed. The default location is usually /usr/share/phpmyadmin or /var/www/html/phpmyadmin. In this example, we will use the default /usr/share/phpmyadmin location.
Step 2: Remove the phpMyAdmin directory
Once you have located the installation directory, you can remove it using the following command:
sudo rm -rf /usr/share/phpmyadmin
This command will completely remove the phpMyAdmin directory and all its contents from your system.
Step 3: Remove phpMyAdmin configuration file
Next, remove the phpMyAdmin configuration file located in the /etc/apache2/conf-available/ directory:
sudo rm /etc/apache2/conf-available/phpmyadmin.conf
Step 4: Disable phpMyAdmin configuration
Disable the phpMyAdmin configuration in Apache using the following command:
sudo a2disconf phpmyadmin
Step 5: Restart Apache web server
Finally, restart the Apache web server for the changes to take effect:
sudo systemctl restart apache2
By following these steps, you will have successfully uninstalled phpMyAdmin from your Ubuntu system, whether you used a package manager or installed it manually.
Thank you for reading this guide on how to uninstall phpMyAdmin on Ubuntu. If you have any questions or need further assistance, please feel free contact us