I registered a new command via Drupal Console using drupal generate:command. I associated the command with a custom module, but after uninstalling the module and removing the module folder, the command still appears when issuing a drupal list command. I couldn't find anything in the Drupal Console documentation relating to this.

How do I let Drupal Console know my module is being uninstalled, so that it doesn't list its commands anymore? Does the module needs to implement a specific method for that, or do I need to run a Drupal Console command for this?

1 Answer 1


Problem solved. Issuing drupal module:uninstall my_module removes the command from the Drupal Console command list.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.