Hiding Entire Panels and Other Elements from the UI
&quot;Whack&quot; em all.

Script will &quot;whack&quot; (unregister) any registered Panel, Menu or Header class that follows the naming convention.
import bpy

classes_to_whack = (
        getattr(bpy.types, p) 
        for p in dir(bpy.types)
        if any(
            sep in p 
            for sep in (&quot;_PT_&quot;, &quot;_HT_&quot;, &quot;_MT_&quot;)
            )
        )
        
for cls in classes_to_whack:
    bpy.utils.unregister_class(cls)

More sensible approach here Unregistering panels in python