How do I delete all menu links from a menu using the menu machine name in Drupal 8
$mids = \Drupal::entityQuery('menu_link_content')
  -&gt;condition('menu_name', 'browse')
  -&gt;sort('weight')
  -&gt;execute();

$controller = \Drupal::entityTypeManager()-&gt;getStorage('menu_link_content');
$entities = $controller-&gt;loadMultiple($mids);
$controller-&gt;delete($entities);