Wednesday, December 28, 2011

Using drush to get a list of enable modules

If you just wanted to make a list of all the modules which are installed in your instance. Don't waste time, be smart write a command using drush.

  1. List all modules and themes : drush pm-list
  2. List only modules : drush pm-list --type=Module
  3. List all modules except core modules : drush pm-list --type=Module --no core
  4. List all enabled modules except those from the core : drush pm-list --type=Module --no core -- status=enabled
  5. List all enabled modules except those from the core which belong to the CCK package : drush pm-list --type=Module --no core --package=CCK status=enabled
If you want more info about the pm-list
  1. drush help pm-list