How to remove certain meta tags? How can I remove these tags from my pages in Drupal 7?

&lt;link rel="shortlink" href=" .... " /&gt;
&lt;meta name="Generator" content="Drupal 7 (http://drupal.org)" /&gt;
&lt;link rel="canonical" href="...." /&gt;


Update: I have the code for template.php, which removes the generator and canonical tags.

function program_html_head_alter(&amp;$head_elements) {
  unset($head_elements['system_meta_generator']);
  foreach ($head_elements as $key =&gt; $element) {
    if (isset($element['#attributes']['rel']) &amp;&amp; $element['#attributes']['rel'] == 'canonical') {
      unset($head_elements[$key]); 
    }
  }
}


Can anybody add something to remove the short link tag?
This is displayed in html.tpl.php in the variable $head. $head is added to the variables in template_process_html by using drupal_get_html_head(). In that function, you can see that hook_html_head_alter() is called.

There can you remove these.

However, note that these links can be important for SEO, to avoid that a search engine thinks that you have duplicate content on your site, if for example a node is available through node/nid and the alias.