Same name and namespace in other branches
- 10 core/lib/Drupal/Core/Extension/module.api.php \hook_uninstall()
- 6.x developer/hooks/install.php \hook_uninstall()
- 7.x modules/system/system.api.php \hook_uninstall()
- 8.9.x core/lib/Drupal/Core/Extension/module.api.php \hook_uninstall()
- 9 core/lib/Drupal/Core/Extension/module.api.php \hook_uninstall()
Remove any tables or variables that the module sets.
The uninstall hook will fire when the module gets uninstalled.
Related topics
16 functions implement hook_uninstall()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- aggregator_uninstall in modules/
aggregator/ aggregator.install - Implementation of hook_uninstall().
- blogapi_uninstall in modules/
blogapi/ blogapi.install - Implementation of hook_uninstall().
- book_uninstall in modules/
book/ book.install - Implementation of hook_uninstall().
- contact_uninstall in modules/
contact/ contact.install - Implementation of hook_uninstall().
- drupal_uninstall in modules/
drupal/ drupal.install - Implementation of hook_uninstall().
File
- developer/
hooks/ install.php, line 225 - Documentation for the installation and update system.
Code
function hook_uninstall() {
db_query('DROP TABLE {profile_fields}');
db_query('DROP TABLE {profile_values}');
variable_del('profile_block_author_fields');
}