Skip to main content
1 of 6
paulgv
  • 181
  • 5

Drush site-upgrade : "Unknown option: --uninstall"

SOLVED (see below)

I'm trying to update a Drupal site from 6.34 to 7.x using Drush. When I run drush site-update @alias, everything goes well until step 12-a where it ends up throwing this error :

Unknown option: --uninstall.  See `drush help pm-disable` for available options. To suppress this error, add the option --strict=0.

I made some search about this and tried a few things :

$options['strict'] = FALSE;

  • In that same drushrc file, I added this line :

$command_specific['pm-disable'] = array('strict' => 0);

This solution was proposed here : https://www.drupal.org/node/2074781

alias drush='drush --strict=0'

Neither of these solutions helped, I always get the same error.

OS: Ubuntu 14.10
Drush : 6.2.0
PHP: 5.5.12-2ubuntu4.1 (cli)

I actually solved the issue while asking the question but I figured I would post both the question and its solution in case somebody else has the same problem. My Drush configuration file was simply misplaced, I had to put it in Drupal's directory (sites/all/drush/drushrc.php) rather than ~/.drush/

When running

drush status

From your Drupal source site directory, make sure there is a Drush configuration loaded.

Drush version                   :  6.2.0
Drush configuration             :  /var/www/html/drupal/sites/all/drush/drushrc.php
Drush alias files               :  /root/.drush/my.alias.drushrc.php
paulgv
  • 181
  • 5