How to exclude an external js from a particular node? How can we remove an external js from a particular node!

For Ex:
Remove http://cdn.jquerytools.org/1.2.6/jquery.tools.min.js from home page.
If the script is added in a correct way(using Drupal API) you should be able to unset it as following:

Drupal 7:

/**
 * Implements HOOK_js_alter().
 *
 * @param $js
 */
function HOOK_js_alter(&amp;$js) {

  $node = menu_get_object();
  if (!empty($node-&gt;nid) &amp;&amp; $node-&gt;nid == XXX) {
    unset($js['your_path']);
  }

}


Drupal 8:

/**
 * Implements HOOK_page_attachments_alte().
 *
 * @param $attachments
 */
function HOOK_page_attachments_alter(&amp;$attachments) {
  /** @var \Drupal\node\NodeInterface $source */
  $node = \Drupal::routeMatch()-&gt;getParameter('node');

  if ($node instanceof \Drupal\node\NodeInterface &amp;&amp; $node-&gt;id() == XXX) {
    unset($attachments['your_js_path']);
  }
}