Delete Custom Content Type Content with Custom Fields I want to delete the content of a custom content type, which has thousand of nodes. The problem is that I can delete the references from the node database table, but the issue in this solution is that the content still remains in the custom field types database table, and when I want to recreate some data, it gives me the error of duplicate data.

Is there a solution to delete custom content type nodes with there related custom field types?

I am using Drupal 7.
You could use node_delete or node_delete_multiple to do this:

// Retrieve all nids for your custom content type.
$result = db_query("SELECT nid FROM {node} WHERE type = :node_type", array(":node_type" =&gt; "&lt;YOUR_CONTENT_TYPE&gt;"))
  -&gt;fetchAll();

// Delete all nodes.
foreach($result as $nid) {
  node_delete($nid);
}

// You should also be able to use node_delete_multiple().
// node_delete_multiple($result);