Remove All Unwanted js and css files from theme
Drupal only has one sanctioned mechanism for removing specific assets, regardless of the motivation for doing so.

For CSS:

hook_css_alter

For JS:

hook_js_alter

To remove all style and scripts except .info style and script use below codes:     

function hook_css_alter(&amp;$css) {
    $themes=list_themes();
          foreach($css as $key=&gt;$item) {
            if (!in_array($key, $themes['yourthemename']-&gt;stylesheets['all'])) {
                unset($css[$key]);
            }
        }
}



function hook_js_alter(&amp;$js) {
    $themes=list_themes();
    foreach($js as $key=&gt;$item) {
        if (!in_array($key, $themes['yourthemename']-&gt;scripts)) {
            unset($js[$key]);
        }
    }
}


If the theme/module is custom, then obviously you can just remove the offending code manually if that makes more sense.