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
Well, the answer lies on the surface:
$types = array('my_content_type_name');
$nids_query = db_select('node', 'n')
->fields('n', array('nid'))
->condition('n.type', $types, 'IN')
->range(0, 500)
->execute();
$nids = $nids_query->fetchCol();
entity_delete_multiple('node', $nids);
I advice you to use "range" and some sort of "batch" (or just re-run the code multiple times), because it's a very fat operation (500 nodes per operation is ok for 256MB).
To execute this code you can either write custom module OR use the devel module: https://www.drupal.org/project/devel
After installation go to yoursite_address/devel/php and execute php code there.