how to set and unset javascript files for specifc path aliases in Drupal 7?
As far as adding the JS file goes it probably depends where you're calling that code from. If you're calling it directly in a template file it's probably happening too late in the page build.

A hook_preprocess_page() implementation would probably be a good place for it (as would hook_init() and probably a bunch of others). You can also use request_uri() to check the current path without incurring a lookup for the alias.

function MYMOUDLE_preprocess_page(&amp;$vars) {  
  if (request_uri() == '/about-us') {
    drupal_add_js(drupal_get_path('theme', 'mytheme') . "/page-download.js");
  }
}


If for whatever reason you can't get that to work, you can remove a JS file by implementing hook_js_alter():

function MYMODULE_js_alter(&amp;$js) {
  if ($some_condition) {
    $js_path = drupal_get_path('theme', 'mytheme') . "/page-download.js";
    if (isset($js[$js_path])) {
      unset($js[$js_path]);
    }
  }
}