When you want to remove Drupal’s generator metatag.

<?php

/**
 * Implements hook_html_head_alter().
 */
function MYMODULE_html_head_alter(&$head_elements) {
  if (isset($head_elements['system_meta_generator'])) {
    unset($head_elements['system_meta_generator']);
  }
}