Field Collection Data Deletion for particular Content type I have one senario where 2 for content type i have added field collection field.

Each content type has around 3k plus nodes data. each nodes has 50+ records of field collections. All content creation done through excel import functionality.

For second content type, the field collection records that i imported is wrong. i want delete all the fields collection items only for second content type.

How to do it? i can't manually since it has 3k+ nodes and 50+ records in each nodes.

Any module which handle these kind of scenario? or any coding documentation which help me here.

as i search i got few related links as below. but none of them completely fit my requirement.

Could anyone please let me know or help me achieve this.

Deleting field collection items : As mentioned on this page i can't play with DB.

Field Collection Value field is not deleting correctly(using programmatically) : looks like i can use it deletion of data. but how for particular content type.

And I have to give one interface on the site where a non-technical guy can handle this if the same mistake happens.

If anybody knows please help.

Thanks in Advance.
My suggestion is to do this using code. IF your using D7, try following code in any custom module or in a basic page. 

//Use a query to get all nodes of your particular content type.

$results = db_query("SELECT nid FROM node WHERE type = 'your-content-type'");
$nids = array();
foreach($results as $result){
  $nids[] = $result-&gt;nid;
}

foreach($nids as $nid){ // use for loop for testing
  $node = node_load($nid);
  foreach ($node-&gt;field_international_activity[LANGUAGE_NONE] as $key =&gt; $value) {
   // Build array of field collection values.
   $field_collection_item_values[] = $value['value'];

   // Unset them.  
   unset($node-&gt;field_international_activity[LANGUAGE_NONE][$key]);
  }

// Delete field collection items.
entity_delete_multiple('field_collection_item', $field_collection_item_values);
node_save($node);
}


For more details please refer link1, link2

This code is not tested, first just try for a single node by using a for loop instead of foreach.