Last updated August 16, 2016. Created on July 1, 2014.
Edited by craigperks, JJmonterey, wusel, drupaledmonk. Log in to edit this page.

Drupal generator meta tag can be hidden using this module https://www.drupal.org/project/remove_generator

<meta name="Generator" content="Drupal 7 (http://drupal.org)" />

The same can also be done using template.php. Put in the below code in template.php file. If you already have _html_head_alter() defined, add the below code in that function.

To replace the Generator meta tag

/**
* Implements hook_html_head_alter().
*/
function YOUR_THEME_html_head_alter(&$head_elements) {
  // Replace Drupal generator meta tag.
  // Use this if you want to replace the Drupal 7 Generator meta tag.
  $generator = 'Enter your text here';
  $head_elements['system_meta_generator']['#attributes']['content'] = $generator;
  if (isset($head_elements['system_meta_generator']['#attached']['drupal_add_http_header'][0][1])) {
    $head_elements['system_meta_generator']['#attached']['drupal_add_http_header'][0][1] = $generator;
  }
}

To remove the Generator meta tag

/**
* Implements hook_html_head_alter().
*/
function YOUR_THEME_html_head_alter(&$head_elements) {
  // Remove Drupal generator meta tag.
  // Use this if you want to remove the Drupal 7 Generator meta tag.
  if (isset($head_elements['system_meta_generator'])) {
    unset($head_elements['system_meta_generator']);
  }
}


Alternative solution
If you use the module Metatag (https://www.drupal.org/project/metatag), then you can edit the Drupal generator meta tag there.
Example metatag images:

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.