How to Remove Block Library CSS from WP?

Latest WordPress installations has a default Gutenberg editor enabled, for that WordPress use special CSS libraries to manage blocks on your site’s front-end. If you are using this new WP editor, it will automatically add this library CSS code on your site.

<link rel='stylesheet' id='wp-block-library-css'  href='http://{yoursitename.com}/wp-includes/css/dist/block-library/style.min.css' type='text/css' media='all' />

But, if you are not using Gutenberg blocks in your editor, you can use the following code snippet to remove this stylesheet from your theme in functions.php

function wp_remove_block_library_css(){
    wp_dequeue_style( 'wp-block-library' );
}
add_action( 'wp_enqueue_scripts', 'wp_remove_block_library_css' );

This will remove the Block Library CSS from your pages and help to increase the page speed. Also help to Eliminate render-blocking resources, and improve the PageSpeed Score.