My module adds content types by implementing hook_node_info. After disabling and uninstalling the module, the content type is still in the database and is merely marked as disabled.

NOTE: I also add create and instantiate custom fields for the created content type.

Since according to this answer content types created in hook_node_info are deleted automatically, is my problem a sign if DB inconsistency or am I doing something else wrong.


function test_core_node_info() {
    // Name of the proper localization function
    $t = get_t ();
    // Adding author
    return array (
            'test' => array (
                    'name' => $t ( 'Test' ),
                    'base' => 'test_module',
                    'description' => $t ( 'Test' ),
                    'title_label' => $t ( 'Title' ),
                    'locked' => TRUE 

-- EDIT --

I mentioned removing instead of uninstalling. This is corrected now.

  • did you implement hook Uninstall?
    – frazras
    Commented Jul 30, 2013 at 2:04
  • Yes. But in hook_uninstall I just remove the custom taxonomy vocabularies I added during the installation.
    – user19626
    Commented Jul 30, 2013 at 8:26

1 Answer 1


You shall have to uninstall the module to get the type deleted automatically. Just disabling it will not remove anything. Deleting the module after disabling it - without uninstalling it first - is not a good idea.

After disabling the module, click on the “uninstall” tab at the top of the modules page and check the module you want to uninstall, then click the "Uninstall" button.

  • May bad: I meant "uninstalling" by removing not just deleting the folder!
    – user19626
    Commented Jul 30, 2013 at 8:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.