Zend certified PHP/Magento developer

Magento2 – exclude all js for a custom theme

I want to include my own js or include only few js in require.js, but need to exclude all js files / css files being loaded default by Magneto or any module.
it is explained here –

https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html#layout_markup_css

as per the docs – I should include in my –

app/design/frontend///Magento_Theme/layout/default_head_blocks.xml

like –


I have done exactly that but it doesn’t seems to be working.

but it is working for other instances for example


This line is removing timer.js

In a nutshell I want to remove all js (barring few) from my custom theme.