Sep 12, 2019 in Drupal 8, Snippets

Sometimes you forgot to uninstall a module when you removed it. To keep thing clean, uninstall the module using the following drush script.

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