Custom Module to remove User Menu Tabs
Hooks need to be written in . module file not in controller. Move your code to .module file and also it should be tabedit_menu_local_tasks_alter
tabedit.module
&lt;?php

/**
 * Implements hook_menu_local_tasks_alter()
 */
function tabedit_menu_local_tasks_alter(&amp;$data, $route_name) {
  unset($data['tabs'][0]['simplenews.newsletter_subscriptions_user']);
}


Clear flush all caches so hook gets pickedup.