How do I Uninstall a module?

Site setup

In the course of your development work, it may at times be necessary to completely uninstall a module - this includes removing the module's code and any database tables or table entries created by that module. You can uninstall a module by following these three easy steps:

  1. Before you uninstall a module you must disable it. Disabling stops the module's code from executing but does not affect any of the database tables or configuration data created by the module. To disable the module go to admin/build/modules, uncheck the box next to the module's name, then press the "Save configuration" button at the bottom of the page.
  2. Next, to complete the uninstall, you must go to admin/build/modules/uninstall, check the module or modules you wish to uninstall, and press the "Uninstall" button. You will be redirected to a confirmation page, asking you if you really want to uninstall the module and lose all the data. (Say Yes!) Note: Not all modules create data in the DB. If a module doesn't define a hook_uninstall() function you will not see it listed at admin/build/modules/uninstall. That's OK - it simply means you get to skip this step.
  3. Finally, delete the source code from your filesystem, e.g. sites/all/modules/yourmodulename (or wherever you put it...). You cannot just rename this folder - the source code can't be left anywhere in the filesystem under sites/all/modules.

One caveat: A well-written module should clean up after itself by removing all of its module-specific data and tables from the DB. However, not all modules are well-written. It's entirely possible that a given module could leave junk in your DB. If you want to keep your database really clean, you will have to try and identify this junk and remove it by hand. If you go through all that trouble, please inform the module's author of what had to be done! As of version 1.0, all modules in the Ubercart distribution do a thorough job of removing their data. Contributed modules are the ones to watch out for.