Deregister unwanted scripts in WordPress

if ( !is_admin()) {
    add_action( 'wp_print_scripts', 'my_init' ); 

    function my_init() {
    	if(is_home() || is_archive() || is_search()) {
        wp_deregister_script( 'l10n' );
        wp_deregister_script( 'jquery' ); }
    }
}
Advertisements