I observed that by default "drush dl module_name" installs the latest version possible may it be dev version available.
How can we install a specific version of a project with Drush?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
To download a specific version of a project, specify the 'project name', followed by a dash, then the version name. The -y argument answers "yes" to any and all prompts.
The exact 'project name' for a module, is what is included in the URL of the module on D.O., i.e. everything following the last '/' in the URL. So for the Organic Groups module, that would be
og, because its URL is
As an example, consider something like this:
drush dl og-7.x-1.3
You can also specify a development version of a module, as in this exmple (which would download the current 7.x-2.x-dev version of Organic Groups):
drush dl og-7.x-2.x
For many more details, samples, etc, refer to http://www.drushcommands.com/drush-6x/pm/pm-download and/or http://www.drushcommands.com/drush-7x/pm/pm-download. Or to Installing a specific version of a project with drush.
After you downloaded the specific version, you "enable" the module as per the normal Drupal procedures to do so.
If you want to also enable the module using Drush, then there is no more need to specify the version of the module. To continue the above example, to enable the 7.x-1.3 version of it (after you down;oaded it), use a command like so:
drush en og
If you don't know the specific version that you want to download, you can use the
--select option, and Drush will prompt you with all of the most recent available versions:
drush dl devel --select
--all option for a comprehensive list.
You can also see this list without downloading via
drush pm-releases devel.