8

Is there a way for drush to print out what module version for a module that is currently enabled?

I'm not looking for trying to find what version of drush is.

I end up doing it the janky way:

drush dl mymodule --select and then seeing which version is installed.

Or drush pm-list | grep mymodule

22

For Drupal 7 and earlier, try using drush pm-info module. It may give you what you want.

For Drupal 8 and later, the pm commands are mostly deprecated. To get module information, you would use composer show drupal/module.

| improve this answer | |
  • This works for drupal-7. For drupal-8 look in composer.lock. – Interlated Dec 18 '19 at 0:51
  • 1
    @Interlated Thanks for the reminder. composer show is more readable that directly poking through the lockfile. – mpdonadio Dec 18 '19 at 1:01
8

You can use the shortcut:

drush pmi [module]
| improve this answer | |
4

This will give you a list of all the currently enabled, contrib(i.e., non-core), modules on your site along with the exact version number:

drush pm-list --type=module --no-core --status=enabled
| improve this answer | |

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.