You are here

Can't disable a module in Drupal? "fields pending deletion"?

All of us who have been working with Drupal for a while have run into this issue: you want to disable a module that you are no longer using, but it's grayed-out on the 'Modules' tab, and so you aren't able to disable and uninstall it.

It says Required by: Drupal (Fields pending deletion)

Required by: Drupal (Fields pending deletion)

Well, you know what this means, so you go to the fields list screen at /admin/reports/fields

You delete all the fields that were related to this module, you run cron multiple times (that's what all the replies to this problem say), and still, you cannot disable the module.

If this is happening to you, as it happened to me recently with the Geofield module, here's the quick fix:

Go into the field_config table in your Drupal database, and look for the field in question.  It should say that the field in question has been deleted already:

Click on the image to see it full-size

Of course, if the field, which is causing the module dependency is not deleted, don't use this approach - go and delete it properly from the system.  If you're doing that type of thing through the database, you'll only run into trouble, because you probably don't know all the clean-up and work Drupal is doing behind the scenes as you delete a field.

But if it is indeed deleted (i.e. it no longer appears in the field list at /admin/reports/fields), you can go ahead and delete that row from the table, and refresh the Modules page.  Voila!  You can now disable your module.  :-)



Great! worked a treat, thanks!

Thanks, it worked great form, with the workflow module.

Thank you! Worked for the entity reference module.

Thank you works great - greetings from germany !

I think simply running the cron will clean up these pending deleted fields.

Lucky you haven't run into this problem, but this is for when you run cron multiple, multiple times and it still doesn't do the job. ;)

Thank you so much! This guide was 100% accurate and saved me a headache.

That worked when nothing else, as you mentioned, did. You saved me a huge amount of time! Thank you for posting this solution and for being so clear about how get it to work.

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.