remove link tags in head
Links like this are handled as attachments to the page.  They are inserted where the Drupal placeholder tags (like head-placeholder) are in the twig file.

To modify these, you need to use hook_page_attachments_alter().  Here's example code that fixes a problem with canonical URLs containing query string not getting generated properly by core (converts &amp; to &amp;amp;).  

/**
 * Implements hook_page_attachments_alter().
 */
function mytheme_page_attachments_alter(array &amp;$attachments) {
  if ( isset($attachments['#attached']['html_head'])) {
    foreach ($attachments['#attached']['html_head'] as $key =&gt; $item) {
      if (in_array("canonical_url", $item)) {
        $href = $item[0]['#attributes']['href'];
        $attachments['#attached']['html_head'][$key][0] = [
          '#type' =&gt; 'inline_template',
          // Formatted to include a newline in page source.
          '#template' =&gt; "{{ href|raw }}
",
          '#context' =&gt; [
            'href' =&gt; '&lt;link rel="canonical" href="' . $href . '"/&gt;',
          ]
        ];
      }
    }
  }
}


In the case of these entity links, these are in the 'html_head_link' area of the attachments.

FYI - This is also related to this core issue.