Duplicated modules and drush During an update process of Open Atrium I ended up with the Organic Groups module (og) duplicated in sites/all/modules/og an profiles/openatrium/modules/contrib/og. I checked the 'system' table in the database and the one that's enabled is in sites/all/modules, however if I update the record in the 'system' table in order to use the module in profiles/openatrium/modules and afterwards I run the drush command

drush pmi og


and the output still reads:

Path: sites/all/modules/og 


so where does drush get this value from?
Drupal caches the system table with all the module locations, so you'll need to run: 

    drush registry-rebuild


or use the Registry Rebuild module in order to flush that cache after manually updating the module paths in the system table. Alternatively, you could also just manually delete the system list from the cache bootstrap table:

    DELETE FROM cache_bootstrap WHERE cid='system_list';


Sources: 

Overriding and Removing Overridden Modules included in a Distribution - https://drupal.org/node/1974964

Disabling or Enabling modules manually in the database - https://drupal.org/node/157632