Skip to main content
Explaining command
Source Link
Rick
  • 3k
  • 4
  • 40
  • 68

Given that you could do the following too :

$ drush pml  | grep 'Enabled'
$ drush pml  | grep 'Disabled'
$ drush help pml
Show a list of available extensions (modules and themes).

Options:
 --core                                    Filter out extensions that are not in drupal core.                                             
 --no-core                                 Filter out extensions that are provided by drupal core.                                        
 --package                                 Filter by project packages. You can use multiple comma separated values. (i.e. --package="Core 
                                           - required,Other").                                                                            
 --pipe                                    Returns a whitespace delimited list of the names of the resulting extensions.                  
 --status=<disabled>                       Filter by extension status. Choices: enabled, disabled and/or 'not installed'. You can use     
                                           multiple comma separated values. (i.e. --status="disabled,not installed").                     
 --type=<module>                           Filter by extension type. Choices: module, theme.       

For example, you could use

$ drush pml --no-core --status="not installed" --type=module
 Package                                Name                                                                     Version             
 Administration                         Actions permissions (VBO) (actions_permissions)                          7.x-3.2             
 BackgroundField                        BackgroundField (backgroundfield)                                        7.x-1.5             
 Chaos tool suite                       Better Jump Menus (jump_menu)                                            7.x-1.4             
 Chaos tool suite                       Chaos Tools (CTools) AJAX Example (ctools_ajax_sample)                   7.x-1.6

***Note and caution:***  Always try this stuff on a development or vagrant box first. NEVER blindly do this to a production box.
$ drush help pml
Show a list of available extensions (modules and themes).

Options:
 --core                                    Filter out extensions that are not in drupal core.                                             
 --no-core                                 Filter out extensions that are provided by drupal core.                                        
 --package                                 Filter by project packages. You can use multiple comma separated values. (i.e. --package="Core 
                                           - required,Other").                                                                            
 --pipe                                    Returns a whitespace delimited list of the names of the resulting extensions.                  
 --status=<disabled>                       Filter by extension status. Choices: enabled, disabled and/or 'not installed'. You can use     
                                           multiple comma separated values. (i.e. --status="disabled,not installed").                     
 --type=<module>                           Filter by extension type. Choices: module, theme.       


***Note and caution:***  Always try this stuff on a development or vagrant box first. NEVER blindly do this to a production box.

Given that you could do the following too :

$ drush pml  | grep 'Enabled'
$ drush pml  | grep 'Disabled'
$ drush help pml
Show a list of available extensions (modules and themes).

Options:
 --core                                    Filter out extensions that are not in drupal core.                                             
 --no-core                                 Filter out extensions that are provided by drupal core.                                        
 --package                                 Filter by project packages. You can use multiple comma separated values. (i.e. --package="Core 
                                           - required,Other").                                                                            
 --pipe                                    Returns a whitespace delimited list of the names of the resulting extensions.                  
 --status=<disabled>                       Filter by extension status. Choices: enabled, disabled and/or 'not installed'. You can use     
                                           multiple comma separated values. (i.e. --status="disabled,not installed").                     
 --type=<module>                           Filter by extension type. Choices: module, theme.       

For example, you could use

$ drush pml --no-core --status="not installed" --type=module
 Package                                Name                                                                     Version             
 Administration                         Actions permissions (VBO) (actions_permissions)                          7.x-3.2             
 BackgroundField                        BackgroundField (backgroundfield)                                        7.x-1.5             
 Chaos tool suite                       Better Jump Menus (jump_menu)                                            7.x-1.4             
 Chaos tool suite                       Chaos Tools (CTools) AJAX Example (ctools_ajax_sample)                   7.x-1.6

***Note and caution:***  Always try this stuff on a development or vagrant box first. NEVER blindly do this to a production box.
Explaining command
Source Link
Rick
  • 3k
  • 4
  • 40
  • 68

You canI have two suggestions for you on how to filter that drush command. One is with pipes and grep. See the command below to list everythingThe other is with status of "Not installed"the option arguments.

First off I think you want drush pml (lowercase "L", not lowercase "I").

(1) Pipes and Grep See the command below to list everything with status of "Not installed". The following may help give you a better picture of what's around your site. For example, here is what is there but "not installed" on my dev box.

$ drush pml | grep 'Not installed' | grep -v Core
 Administration                       Actions permissions (VBO) (actions_permissions)               Module  Not installed  7.x-3.2        
 BackgroundField                      BackgroundField (backgroundfield)                             Module  Not installed  7.x-1.5        
 Chaos tool suite                     Better Jump Menus (jump_menu)                                 Module  Not installed  7.x-1.4        
 Chaos tool suite                     Chaos Tools (CTools) AJAX Example (ctools_ajax_sample)        Module  Not installed  7.x-1.6        
 Chaos tool suite                     Chaos Tools (CTools) Plugin Example (ctools_plugin_example)   Module  Not installed  7.x-1.6        
 Chaos tool suite                     Custom content panes (ctools_custom_content)                  Module  Not installed  7.x-1.6        
 Chaos tool suite                     Custom rulesets (ctools_access_ruleset)                       Module  Not installed  7.x-1.6        
 Chaos tool suite                     Page manager existing pages (pm_existing_pages)               Module  Not installed  7.x-1.4        
 Chaos tool suite                     Stylizer (stylizer)                                           Module  Not installed  7.x-1.6        
 Chaos tool suite                     Term Depth access (term_depth)                                Module  Not installed  7.x-1.6        
 Chaos tool suite                     Views content panes (views_content)                           Module  Not installed  7.x-1.6        
 Charting                             Chart API (chart)                                             Module  Not installed  7.x-1.1        
 Charting                             Chart API Views Integration (chart_views)                     Module  Not installed  7.x-1.1        
 Charting                             Drupal System Charting (system_charts)                        Module  Not installed  7.x-1.1        
 Context                              Context Mobile Detect (context_mobile_detect)                 Module  Not installed  7.x-1.3        
 Context                              Context OG (context_og)                                       Module  Not installed  7.x-1.1        
 Context                              Context PHP (contextphp)                                      Module  Not installed  7.x-1.x-dev    
 Context                              Context Respect (context_respect)                             Module  Not installed  7.x-1.2        
 Date/Time                            Date All Day (date_all_day)                            

Taken individually that is

drush pml \     Module  Not installed  7.x-2.8     # Shows table 
 of Datemodules/Time                            Date Context (date_context)                                   Module  Not installed  7.x-2.8     themes and their status
 Date/Time                            Date iCal (date_ical)                                        | Modulegrep 'Not Notinstalled' installed\  7.x-2.12# Filters for any line WITH 'Not installed'
 Date/Time                            Date Repeat API (date_repeat)                                 Module  Not installed| grep 7.x-2.8        
 Date/Time                            Date Repeat Field (date_repeat_field)             v Core           Module # NotFilters installedOUT any 7.x-2.8line containing string 'Core'

Note and caution: Always try this stuff on a development or vagrant box first. NEVER blindly do this to a production box.(2) With options arguments to drush pml

You could also vary it up a bit with different arguments in the drush pml command

$ drush help pml
Show a list of available extensions (modules and themes).

Options:
 --core                                    Filter out extensions that are not in drupal core.                                             
 --no-core                                 Filter out extensions that are provided by drupal core.                                        
 --package                                 Filter by project packages. You can use multiple comma separated values. (i.e. --package="Core 
                                           - required,Other").                                                                            
 --pipe                                    Returns a whitespace delimited list of the names of the resulting extensions.                  
 --status=<disabled>                       Filter by extension status. Choices: enabled, disabled and/or 'not installed'. You can use     
                                           multiple comma separated values. (i.e. --status="disabled,not installed").                     
 --type=<module>                           Filter by extension type. Choices: module, theme.       


***Note and caution:***  Always try this stuff on a development or vagrant box first. NEVER blindly do this to a production box.

You can filter that drush command with pipes and grep. See the command below to list everything with status of "Not installed".

$ drush pml | grep 'Not installed' | grep -v Core
 Administration                       Actions permissions (VBO) (actions_permissions)               Module  Not installed  7.x-3.2        
 BackgroundField                      BackgroundField (backgroundfield)                             Module  Not installed  7.x-1.5        
 Chaos tool suite                     Better Jump Menus (jump_menu)                                 Module  Not installed  7.x-1.4        
 Chaos tool suite                     Chaos Tools (CTools) AJAX Example (ctools_ajax_sample)        Module  Not installed  7.x-1.6        
 Chaos tool suite                     Chaos Tools (CTools) Plugin Example (ctools_plugin_example)   Module  Not installed  7.x-1.6        
 Chaos tool suite                     Custom content panes (ctools_custom_content)                  Module  Not installed  7.x-1.6        
 Chaos tool suite                     Custom rulesets (ctools_access_ruleset)                       Module  Not installed  7.x-1.6        
 Chaos tool suite                     Page manager existing pages (pm_existing_pages)               Module  Not installed  7.x-1.4        
 Chaos tool suite                     Stylizer (stylizer)                                           Module  Not installed  7.x-1.6        
 Chaos tool suite                     Term Depth access (term_depth)                                Module  Not installed  7.x-1.6        
 Chaos tool suite                     Views content panes (views_content)                           Module  Not installed  7.x-1.6        
 Charting                             Chart API (chart)                                             Module  Not installed  7.x-1.1        
 Charting                             Chart API Views Integration (chart_views)                     Module  Not installed  7.x-1.1        
 Charting                             Drupal System Charting (system_charts)                        Module  Not installed  7.x-1.1        
 Context                              Context Mobile Detect (context_mobile_detect)                 Module  Not installed  7.x-1.3        
 Context                              Context OG (context_og)                                       Module  Not installed  7.x-1.1        
 Context                              Context PHP (contextphp)                                      Module  Not installed  7.x-1.x-dev    
 Context                              Context Respect (context_respect)                             Module  Not installed  7.x-1.2        
 Date/Time                            Date All Day (date_all_day)                                   Module  Not installed  7.x-2.8        
  Date/Time                            Date Context (date_context)                                   Module  Not installed  7.x-2.8        
 Date/Time                            Date iCal (date_ical)                                         Module  Not installed  7.x-2.12       
 Date/Time                            Date Repeat API (date_repeat)                                 Module  Not installed  7.x-2.8        
 Date/Time                            Date Repeat Field (date_repeat_field)                         Module  Not installed  7.x-2.8   

Note and caution: Always try this stuff on a development or vagrant box first. NEVER blindly do this to a production box.

I have two suggestions for you on how to filter that drush command. One is with pipes and grep. The other is with the option arguments.

First off I think you want drush pml (lowercase "L", not lowercase "I").

(1) Pipes and Grep See the command below to list everything with status of "Not installed". The following may help give you a better picture of what's around your site. For example, here is what is there but "not installed" on my dev box.

$ drush pml | grep 'Not installed' | grep -v Core
 Administration                       Actions permissions (VBO) (actions_permissions)               Module  Not installed  7.x-3.2        
 BackgroundField                      BackgroundField (backgroundfield)                             Module  Not installed  7.x-1.5        
 Chaos tool suite                     Better Jump Menus (jump_menu)                                 Module  Not installed  7.x-1.4        
 Chaos tool suite                     Chaos Tools (CTools) AJAX Example (ctools_ajax_sample)        Module  Not installed  7.x-1.6        
 Chaos tool suite                     Chaos Tools (CTools) Plugin Example (ctools_plugin_example)   Module  Not installed  7.x-1.6        
 Chaos tool suite                     Custom content panes (ctools_custom_content)                  Module  Not installed  7.x-1.6        
 Chaos tool suite                     Custom rulesets (ctools_access_ruleset)                       Module  Not installed  7.x-1.6        
 Chaos tool suite                     Page manager existing pages (pm_existing_pages)               Module  Not installed  7.x-1.4        
 Chaos tool suite                     Stylizer (stylizer)                                           Module  Not installed  7.x-1.6        
 Chaos tool suite                     Term Depth access (term_depth)                                Module  Not installed  7.x-1.6        
 Chaos tool suite                     Views content panes (views_content)                           Module  Not installed  7.x-1.6        

Taken individually that is

drush pml \               # Shows table of modules/themes and their status
| grep 'Not installed' \  # Filters for any line WITH 'Not installed'
| grep -v Core            # Filters OUT any line containing string 'Core'

(2) With options arguments to drush pml

You could also vary it up a bit with different arguments in the drush pml command

$ drush help pml
Show a list of available extensions (modules and themes).

Options:
 --core                                    Filter out extensions that are not in drupal core.                                             
 --no-core                                 Filter out extensions that are provided by drupal core.                                        
 --package                                 Filter by project packages. You can use multiple comma separated values. (i.e. --package="Core 
                                           - required,Other").                                                                            
 --pipe                                    Returns a whitespace delimited list of the names of the resulting extensions.                  
 --status=<disabled>                       Filter by extension status. Choices: enabled, disabled and/or 'not installed'. You can use     
                                           multiple comma separated values. (i.e. --status="disabled,not installed").                     
 --type=<module>                           Filter by extension type. Choices: module, theme.       


***Note and caution:***  Always try this stuff on a development or vagrant box first. NEVER blindly do this to a production box.
Source Link
Rick
  • 3k
  • 4
  • 40
  • 68

You can filter that drush command with pipes and grep. See the command below to list everything with status of "Not installed".

$ drush pml | grep 'Not installed' | grep -v Core
 Administration                       Actions permissions (VBO) (actions_permissions)               Module  Not installed  7.x-3.2        
 BackgroundField                      BackgroundField (backgroundfield)                             Module  Not installed  7.x-1.5        
 Chaos tool suite                     Better Jump Menus (jump_menu)                                 Module  Not installed  7.x-1.4        
 Chaos tool suite                     Chaos Tools (CTools) AJAX Example (ctools_ajax_sample)        Module  Not installed  7.x-1.6        
 Chaos tool suite                     Chaos Tools (CTools) Plugin Example (ctools_plugin_example)   Module  Not installed  7.x-1.6        
 Chaos tool suite                     Custom content panes (ctools_custom_content)                  Module  Not installed  7.x-1.6        
 Chaos tool suite                     Custom rulesets (ctools_access_ruleset)                       Module  Not installed  7.x-1.6        
 Chaos tool suite                     Page manager existing pages (pm_existing_pages)               Module  Not installed  7.x-1.4        
 Chaos tool suite                     Stylizer (stylizer)                                           Module  Not installed  7.x-1.6        
 Chaos tool suite                     Term Depth access (term_depth)                                Module  Not installed  7.x-1.6        
 Chaos tool suite                     Views content panes (views_content)                           Module  Not installed  7.x-1.6        
 Charting                             Chart API (chart)                                             Module  Not installed  7.x-1.1        
 Charting                             Chart API Views Integration (chart_views)                     Module  Not installed  7.x-1.1        
 Charting                             Drupal System Charting (system_charts)                        Module  Not installed  7.x-1.1        
 Context                              Context Mobile Detect (context_mobile_detect)                 Module  Not installed  7.x-1.3        
 Context                              Context OG (context_og)                                       Module  Not installed  7.x-1.1        
 Context                              Context PHP (contextphp)                                      Module  Not installed  7.x-1.x-dev    
 Context                              Context Respect (context_respect)                             Module  Not installed  7.x-1.2        
 Date/Time                            Date All Day (date_all_day)                                   Module  Not installed  7.x-2.8        
 Date/Time                            Date Context (date_context)                                   Module  Not installed  7.x-2.8        
 Date/Time                            Date iCal (date_ical)                                         Module  Not installed  7.x-2.12       
 Date/Time                            Date Repeat API (date_repeat)                                 Module  Not installed  7.x-2.8        
 Date/Time                            Date Repeat Field (date_repeat_field)                         Module  Not installed  7.x-2.8   

Note and caution: Always try this stuff on a development or vagrant box first. NEVER blindly do this to a production box.