If I install a module, and then uninstall it, for some reason the modules are not removed from my module list (or from my modules folder)- even after repeatedly clearing the cache. Why would this be happening?


The modules on the file system are not intended to be deleted if you uninstall them. Although I can see that the terminology may be confusing.

Uninstalling will delete any references to the module in your site (assuming the module is written to do so), but will not affect the file system in any way.

The only reference to the module will be on the modules page, it will not be used in any live pages on your site. So should be harmless, but if you don't want the module to appear on the modules page you will have to manually delete the files.

  • This wasn't clear to me, coming from WordPress- thanks – Yarin Oct 21 '11 at 16:33
  • I suspected that there is something wrong in module installation and I wanted to re-install. I un-installed the module and when I tried to re-install it Drupal did not allow me since the files already existed in filesystem! – Raj Pawan Gumdal Nov 4 '12 at 11:49

Enabling a module automatically creates module schema if this module implements hook_schema() by invoking hook_install() and it sets its state as active in the system.

Disabling a module just sets the module's state as inactive in the system.

Un-installing is the next step after disabling to remove database schema and configurations from the system.

Removing modules from the module list can only be achieved by removing them from modules directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.