I regularly come across a client's Drupal database and see that it's lingered with left-over tables and settings. These tables are often from modules that were installed during previous Drupal versions or that were ditched altogether. Here's a good tip: uninstall a module before deleting it. Most modules come with an uninstall function that cleans up any used tables and variables, keeping your database nice and tidy. Do note that you still need the module on your server to be able to uninstall it.
So when you're getting rid of a module, go to admin/build/modules and click on "Uninstall". After you've uninstalled them, you're safe to remove the modules from your server.
Also a note for module maintainers: there's still a whole lot of modules out there that install a bunch of tables and variables but that don't use hook_uninstall() to get rid of them. With the Drupal 6 schema API it's even easier to delete all this data.
Promote this article on various sites:
Comments
You're absolutely right.
Hey, Wim. I'm ashamed to admit that I always forget this step. Thanks for the reminder.
Many usefull modules do not
Many usefull modules do not provide uninstall function 8(
In my database there are some tables from old modules and I have to drop them by hands
Post new comment