Created
April 23, 2015 22:19
-
-
Save discipolo/56eef33b8fccd5e4830d to your computer and use it in GitHub Desktop.
remove unused modules in a Drupal site with the help of Drush
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unused=$(drush pm-list --no-core --pipe --type=module --status='not installed' | awk '{print "\x27" $1 "\x27" }' | tr "\n" ",") && drush sqlq "SELECT name, filename from system WHERE name IN (${unused%?});" > unused-modules.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment