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

3 Answers 3

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.

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

You can use the shortcut:

drush pmi [module]
6

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
1

Your Answer

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

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