function hook_uninstall
7.x system.api.php | hook_uninstall() |
6.x install.php | hook_uninstall() |
Remove any information that the module sets.
The information that the module should remove includes:
- Variables that the module has set using variable_set().
- Modifications to existing tables.
- Database tables the module created.
The uninstall hook must be implemented in the module's .install file. It will fire when the module gets uninstalled.
Related topics
19 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 drupal-6.x/
modules/ aggregator/ aggregator.install - Implementation of hook_uninstall().
- blogapi_uninstall in drupal-6.x/
modules/ blogapi/ blogapi.install - Implementation of hook_uninstall().
- book_uninstall in drupal-6.x/
modules/ book/ book.install - Implementation of hook_uninstall().
- contact_uninstall in drupal-6.x/
modules/ contact/ contact.install - Implementation of hook_uninstall().
- dblog_uninstall in drupal-6.x/
modules/ dblog/ dblog.install - Implementation of hook_uninstall().
2 invocations of hook_uninstall()
- drupal_uninstall_module in drupal-6.x/
includes/ install.inc - Calls the uninstall function and updates the system table for a given module.
- system_modules_uninstall in drupal-6.x/
modules/ system/ system.admin.inc - Builds a form of currently disabled modules.
File
- documentation-6.x/
developer/ hooks/ install.php, line 318 - Documentation for the installation and update system.
Code
function hook_uninstall() {
drupal_uninstall_schema('upload');
variable_del('upload_file_types');
}