How to remove undesired local task tabs
To completely remove the tab from all pages you can use hook_local_tasks_alter().

function mymodule_local_tasks_alter(&amp;$local_tasks) {
  unset($local_tasks['local_task_to_remove']);
}


Where local_task_to_remove is the tab you want to remove.

To have it removed from some pages you could use hook_menu_local_tasks_alter() instead. Something like:

function mymodule_menu_local_tasks_alter(&amp;$data, $route_name) {
  $routes = ['entity.entity_view_display.node.default', ...]; // put other routes in place of '...'
  if (in_array($route_name, $routes)) {
    unset($data['tabs'][0]['local_task_to_remove']); 
  }
}