I'm setting up Aegir and had some themes installed, which aren't needed anymore. Installing the themes was quite easy, but for some reason I can't uninstall the modules who are installed to sites/all/*. It keeps on looking for a sites/default/settings.php, while modules and themes available for all installations are stored in the sites/all.

This is the error Drush gave me:
aegir@srv1:~/platforms/drupal7/sites/all/themes$ drush -r /var/aegir/platforms/drupal7 pm-uninstall danland
Command pm-uninstall needs a higher bootstrap level to run - you will need invoke drush from a more functional Drupal environment to run this command. [error]
The drush command 'pm-uninstall danland' could not be executed. [error]
Could not find a Drupal settings.php file at ./sites/default/settings.php. [error]
aegir@srv1:~/platforms/drupal7/sites/all/themes$

Is this a known issue and is there a solution available? Or did I install the modules the wrong way? I want to make the modules available to all websites on the platform (aegir), so updates only have to be applied once (instead of having to update the module on every site).

Comments

joestewart’s picture

It looks like you are not in a site context to be able to uninstall and installed module.

either cd to the sites/example.com or use the site alias.

jonhattan’s picture

Status: Active » Fixed
dboeije’s picture

Status: Fixed » Active

Whenever working in a site context, Drush will only pm-uninstall the modules which are installed to that site context (sites/example.com/). However, all the modules are installed in sites/all to make them avalaible for a wide range of Drupal deployments.

So for some reason it can install the modules within the sites/all context ("the global context"), but can't uninstall what has been installed.

dboeije’s picture

aegir@srv1:~/platforms/drupal7/sites/weloveclouds.nl$ drush pm-uninstall danland
Module danland was not found and will not be uninstalled. [warning]
There were no modules that could be uninstalled. [ok]

aegir@srv1:~/platforms/drupal7/sites/weloveclouds.nl$ ls /var/aegir/platforms/drupal7/sites/all/themes/
adaptivetheme andromeda at-commerce at_panels_everywhere blogbuzz corolla danland deco footheme fusion kanji pixture_reloaded README.txt sky touch touchpro zeropoint
aegir@srv1:~/platforms/drupal7/sites/weloveclouds.nl$

dboeije’s picture

Joestewart's answer rather means that I have to:
1) install the themes and modules within a site context (which makes all the install/updates/uninstalls site-specific)?
-or-
2) install the themes and modules, but not be able to update them and/or uninstall them (without rm -rf)?

I use Drush (with Aegir) to save time for installation, updating and removal of modules and themes, but in the ways as described above I would not enjoy that benefit. The more strange part is still that Drush allows itself to do things it can undo :).

tim.plunkett’s picture

Status: Active » Fixed

danland is a theme. Themes can't be uninstalled.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.