I have a need to remove all nodes of the same type in Drupal 8 (there are over 7k of nodes).
It wouldn\'t be a problem for Drupal 7 (DB query + node_del
Drupal 8 has the functionality to get nodes by content type, so I would use
$nodes = \Drupal::entityTypeManager() ->getStorage('node') ->loadByProperties(array('type' => 'your_content_type')); foreach ($nodes as $node) { $node->delete(); }