22

Is there any way to disable a module and its dependents modules with Drush.

Let's say I need to disable views but I have enable views_accordion as well.

If I run $ drush pm-disable views I don't get the views module disable.

30

You should update your drush by the sounds of things. Doing drush dis views should result in the following:

drush dis views
The following extensions will be disabled: views, views_bulk_operations, og_ui, views_content, og_example, views_php, views_ui
Do you really want to continue? (y/n)

Which means the dependents are disabled at the same time.

  • 3
    Note that this doesn't work for pm-uninstall. instead, you will need to take the list of modules, pass it to pm-uninstall and repeat that command until all modules are uninstalled. – Berdir Jun 13 '12 at 13:14
  • 1
    Yep, I often find myself just going to the actual uninstall page for uninstalling. – 7wonders Jun 13 '12 at 13:16
  • You are right, maybe I did a typo on the method. – chefnelone Jun 13 '12 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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