Bobcares

Drupal Drush Uninstall Module: How to?

by | Aug 4, 2022

Drupal Drush uninstall module is the easiest method for module uninstallation as Drush allows the users to carry out administrative activities within a simple set of commands. Bobcares answers all of your questions on Drupal Drush with the assistance of our Server Management Services.  

Drupal Drush

drupal drush uninstall module

Drush is a Drupal command line shell and Unix scripting interface. Its core includes a plethora of helpful commands and generators. it is a very handy tool because it allows executing different administrative activities in the terminal with just one or two commands, eliminating the need for numerous clicks and page refreshes in the UI.

To uninstall the module, ensure that it is not currently in use on the site so that it does not interfere with any functionality. Uninstall modules using Drush or the Administrative Interface.

Using Drush to Uninstall Modules

Before proceeding with the setups, keep in mind to install Drush on the machine. After that to uninstall the module, use the Drush command:

module name drush pm-uninstall

There is an alternative method to removing the module type in the following command:

drush pmu module_name

Arguments

‘Arguments’ are an array of parameters recognized by the command. Only used by Drupal Drush help. ‘needed-arguments’: FALSE by default; TRUE if all arguments are necessary.

pm-uninstallaccepts 1 argument/s: modules : A list of modules.

Next, use the Drush command given below to clear the cache: drush cr

This is the final step in the Drupal Drush uninstall module. The uninstalled module will no longer appear as checked in the module list, and its functionality will be removed from the site. The Drush allows easy access to the module management procedures for the users to uninstall and manage them effortlessly.

It is normal to forget to uninstall a module after removing it. To keep things tidy, use the Drush script below to uninstall the module.

drush php-eval '\Drupal::service("module_installer")->uninstall(["my_custom_module"]);'

[Need assistance with similar queries? We are here to help]

Conclusion

To conclude, uninstalling modules with Drupal Drush commands is an easy process as Drush gives direct access to commands with simple command lines.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

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

Never again lose customers to poor
server speed! Let us help you.