Community Documentation

hook_uninstall

5 install.php hook_uninstall()
6 install.php hook_uninstall()
7 system.api.php hook_uninstall()
8 system.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()

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().
forum_uninstall in modules/forum/forum.install
Implementation of hook_uninstall().
locale_uninstall in modules/locale/locale.install
Implementation of hook_uninstall().
nodeapi_example_uninstall in developer/examples/nodeapi_example.install
Implementation of hook_uninstall().
node_access_example_uninstall in developer/examples/node_access_example.install
Implementation of hook_uninstall().
node_example_uninstall in developer/examples/node_example.install
Implementation of hook_uninstall().
poll_uninstall in modules/poll/poll.install
Implementation of hook_uninstall().
profile_uninstall in modules/profile/profile.install
Implementation of hook_uninstall().
search_uninstall in modules/search/search.install
Implementation of hook_uninstall().
statistics_uninstall in modules/statistics/statistics.install
Implementation of hook_uninstall().
system_modules_uninstall in modules/system/system.module
Builds a form of currently disabled modules.
theme_system_modules_uninstall in modules/system/system.module
Themes a table of currently disabled modules.

File

developer/hooks/install.php, line 225
Documentation for the installation and update system.

Code

<?php
function hook_uninstall() {
  db_query('DROP TABLE {profile_fields}');
  db_query('DROP TABLE {profile_values}');
  variable_del('profile_block_author_fields');
}
?>
Login or register to post comments