You can manipulate the global variable $submenu
and remove them. In normal circumstances, the index key values are 5
(All items) and 10
(New item). In this example, the post type is portfolio
:
add_action( 'admin_init', 'remove_cpt_submenus_wpse_95797' );
function remove_cpt_submenus_wpse_95797()
{
global $submenu;
unset(
$submenu['edit.php?post_type=portfolio'][5],
$submenu['edit.php?post_type=portfolio'][10]
);
}