Sometimes, there is a need to remove some CSS and JS from a page as there may be conflictions between the theme and module CSS and JS.
In order to remove CSS and JS from a page, <remove> tag is used in layout XML under the <head> tag.
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <head> <remove src="name.css"/> <remove src="css/name.css"/> <remove src="js/name.js"/> <remove src="Vendor_Module::js/name.js"/> </head> </page>
For more reference please visit the following link – https://devdocs.magento.com/guides/v2.2/frontend-dev-guide/layouts/xml-manage.html#layout_markup_css_remove
Thanks.