function hook_modules_uninstalled


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 system.api.php hook_modules_uninstalled($modules)
cle7 system.api.php hook_modules_uninstalled($modules)
elmsmedia7 system.api.php hook_modules_uninstalled($modules)
icor7 system.api.php hook_modules_uninstalled($modules)
meedjum_blog7 system.api.php hook_modules_uninstalled($modules)
mooc7 system.api.php hook_modules_uninstalled($modules)

Perform necessary actions after modules are uninstalled.

This function differs from hook_uninstall() in that it gives all other modules a chance to perform actions when a module is uninstalled, whereas hook_uninstall() is only called on the module actually being uninstalled.

It is recommended that you implement this hook if your module stores data that may have been set by other modules.


$modules: An array of the modules that were uninstalled.

See also



Related topics

9 functions implement hook_modules_uninstalled()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

block_modules_uninstalled in modules/block/block.module
Implements hook_modules_uninstalled().
entity_modules_uninstalled in sites/all/modules/ulmus/entity/entity.module
Implements hook_modules_uninstalled().
field_modules_uninstalled in modules/field/field.module
Implements hook_modules_uninstalled().
module_test_modules_uninstalled in modules/simpletest/tests/module_test.module
Implements hook_modules_uninstalled().
node_modules_uninstalled in modules/node/node.module
Implements hook_modules_uninstalled().

... See full list

1 invocation of hook_modules_uninstalled()
drupal_uninstall_modules in includes/
Uninstalls a given list of disabled modules.


modules/system/system.api.php, line 2652
Hooks provided by Drupal core and the System module.


function hook_modules_uninstalled($modules) {
  foreach ($modules as $module) {
    db_delete('mymodule_table')->condition('module', $module)->execute();



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.