How to Completely Uninstall Modules from Drupal 9
It is common for webmasters that use a certain CMS like Drupal to try installing different modules to find out about their features and keep them in case of further needs. They like to keep those modules especially if they have used a lot of searching to find them.
The number of these modules add up after a while and it has its own issues. One issue is the possible effect on the speed of your website and the other one is security issues related to keeping some unused modules.
It is easy to uninstall modules from Drupal CMS as most other tasks you would need to do with Drupal. As you may know, while you install a module, the files of this module will be located in modules folder on your website and the database files will be added to if the module needs connecting to the database.
It is not recommended at all to delete the files of a module without installing it from the admin menu because you may face issues in functionality or speed of your website.
One important thing to keep in mind is deletion of any database record that the module had created when you uninstall a module.
To uninstall a module from Drupal 9 safely, follow these steps:
Go to the admin panel of your Drupal website which is usually located on: www.yourdomain.com/admin/ (replace your website’s address with your domain). Now Click on the Extend item.
Now you can see possible items from the Extend which are List of modules, Update and Uninstall.
Here you can see all modules and extensions that are installed in your Drupal site. Some of the modules are installed with Drupal installation and the rest of them are the modules you have installed later. To uninstall a module from Drupal 9, choose it from the list.
You can always navigate the items or type the name of the module fully or partially and the modules that match that name will be displayed. Searching is the best option especially if you have a lot of modules installed and navigating them is time consuming.
You will see a checkbox next to each module name. To select an item for uninstalling mark the checkbox of module(s) you want to uninstall. For example, let’s say we are going to uninstall the module called Better Passwords.
Now you will get a confirmation message to prevent unintentional module installation. If you are sure about the uninstallation of the module, click on Uninstall. You can see the notification that says this module and all data of it will be lost!
It takes a few seconds depending on the speed of your server to complete the uninstallation process. After successful uninstallation, you will get a green notification that confirms the uninstallation process.
Now that you have successfully uninstalled the module; you have to make sure that all related files are removed from the Drupal site. You can go to the FTP folder of your site and go to the modules folder.
Open this folder and make sure you don’t see the folder of that uninstalled module and if you can still see that folder, you can delete that folder manually from your server to erase all associated files of that module.