I have programatically created some cck fields with this function:


and I tried to delete them with this:

content_field_instance_delete($field_name, 'product', FALSE)

However, this didn't actually delete the cck field from the Product types database table. The fields didn't show up on the UI edit page but they still exist in the database, which is causing me some issues. How can I systematically make sure the database entry is wipes as well?

1 Answer 1


I believe deleting the fields programmatically like this flags the fields as deleted by CCK or the Field API in Drupal 6/7. You must then run Cron to have the system fully purge the database tables from the system.

  • I just ran cron manually and inspected the table, and there was no change. Not sure if this makes a difference, but as these fields are not reused, instead of new tables in the database, they are extra columns in the content_type_product table. Aug 18, 2014 at 19:15

Your Answer

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

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