Module uninstall dependencies I'v got a question regarding dependencies &amp; configuration. I created a module providing a content type, field type, widget &amp; formatter.


While wanting to uninstall the module, I get the following message:


  The following reason prevents module from being uninstalled:
  
  
  Fields type(s) in use
  

So I go to structure, try to delete the content type &amp; get the following:


  module's content type is used by x pieces of content on your site. You may not remove module's content type until you have removed all of the module's content type content.

I go delete all my nodes first as it seems this needs to be done first. I retry uninstalling the module &amp; get message:


  Fields pending deletion

I run cron &amp; am now able to uninstall my module with message:


  The following modules will be completely uninstalled from your site, and all data from these modules will be lost!



I can see that dependencies are met well, but this gives it a long run before one can uninstall a module.
Is there a way I can keep dependency integrity while once I am willing to uninstall the module to automatically remove configuration &amp; content from start till end dependency?
You can, if you write the code for doing that yourself. Core currently doesn't offer a way to do that automatically.

See Impossible to uninstall Flag and the linked issue for Simplenews for inspiration.