Completely Uninstall Phpmyadmin On Nginx Ubuntu 18.04


Completely Uninstall PhpMyAdmin On NGINX Ubuntu 18.04

Introduction

PhpMyAdmin is a very popular web-based graphical tool for managing MySQL databases in the Ubuntu operating system. It is used by web developers, system administrators, and database admins around the world for database management. PhpMyAdmin allows a user to install, configure, view, edit, and delete database objects. It also provides support for querying and reporting, and includes features for super users and webmaster tools.

This tutorial covers the steps to uninstall PhpMyAdmin from NGINX Ubuntu 18.04. We will use the apt package manager and command line to remove the files associated with PhpMyAdmin completely. We will also show you how to make sure that any left-over configuration or data files still exist on the system.

Prerequisites

Before you begin this guide, you’ll need the following:

  • A server running the Ubuntu 18.04 operating system.
  • A user with non-root sudo privileges.
  • A working installation of the NGINX web server.

Uninstall PhpMyAdmin package

The first step is to uninstall the PhpMyAdmin package. This can be done with the apt package manager. First, update the apt package manager cache:

sudo apt update

Then, use the apt package manager to uninstall PhpMyAdmin package:

sudo apt remove phpmyadmin

With this command, the apt package manager will download and remove all files associated with the package. If you have any other PhpMyAdmin-related packages installed (such as php-mbstring and libapache2-mod-php), they will also be removed.

Remove configuration files

The question may arise as to whether any configuration files were left over after the package was removed. To ensure all configuration files are removed, you need to first remove the configuration file for the web server that was used to serve PhpMyAdmin. In this tutorial, we’ve used the NGINX web server. To remove the configuration file, execute the following command:

sudo rm /etc/nginx/sites-available/phpmyadmin.conf

Next, you need to remove any configuration files that PhpMyAdmin was using. To find them, use the following command in the terminal:

sudo find / -name 'phpp*' -exec rm -f {} ;

Once you have executed the command, it will search the entire file system for any files which contain the string “php”. Any such files will be removed automatically.

Remove Data files

Once the configuration files are deleted, you need to check if there are any user data files left behind. To do this, you need to use the following command:

sudo find / -name 'phpmyadmin_data*' -exec rm -f {} ;

This command will search the system for any files which contain the string “phpmyadmin_data” and delete them if it finds them. This command will also search the entire file system, so it is important that you make sure that there are no user data files that you need to keep before executing it.

Remove leftovers

The last step is to remove any directories that were created when you installed PhpMyAdmin. To do this, use the following command:

sudo rm -rf /var/lib/phpmyadmin

This command will delete the entire folder and contents of the directory. Any files in this folder will be deleted, so make sure that there are no files in the folder which you need to keep.

Conclusion

In this tutorial, we have shown you how to completely uninstall PhpMyAdmin from NGINX on Ubuntu 18.04. To do this, we showed you how to use the apt package manager and command line to remove the files associated with PhpMyAdmin, as well as the configuration files and user data files left behind.

Frequently Asked Questions (FAQs)

Q1. Is PhpMyAdmin necessary to uninstall?

No, it is not absolutely necessary to uninstall PhpMyAdmin. If you are using an alternative web-based database management tool, you may not need to uninstall PhpMyAdmin.

Q2. Will uninstalling PhpMyAdmin affect any other programs or applications?

No, uninstalling PhpMyAdmin should not affect any other programs or applications. However, if you have any specific configuration files that you have edited, it is recommended to back them up before uninstalling PhpMyAdmin.

Q3. Is the command provided to remove configuration files and user data files valid?

Yes, the commands provided in this tutorial are valid for removing the configuration files and user data files associated with PhpMyAdmin. It is recommended to back up any important files before executing these commands.

Thank you for reading this article. To learn more about other topics related to web development, system administration, and database management, please take a look at our other articles.

Leave a Reply

Your email address will not be published. Required fields are marked *