As a Magento 2 developer sometimes you might need to completely disable a specific event that is implemented either in native code or a 3rd party module. One option would be to override the observer method however that is not a good practice. Instead there is a better way. You should use the native disabled attribute. Here is an example on how to disable the controller_action_noroute event. Originally define in CMS native module:
In order to disable the event we need to create a new xml file and define the same event with disabled property set to true.
This works because the dispatch method in Invoker class checks for the node and if the value is true the observer method is not called. Take a look at the method to understand this:
That is it for this article. Hopefully this comes in handy when developing Magento 2.