Simplify Blender GUI using Python
To remove panels, you can simply unregister the classes.

Here we remove all View 3D Panels:

import bpy
for pt in bpy.types.Panel.__subclasses__():
    if pt.bl_space_type == 'VIEW_3D':
        bpy.utils.unregister_class(pt)


Of course you may want to do some other checks to only remove some of the panels... try use the Python console to inspect the panel types and see which members are useful to check (__name__ for example)

Note that __subclasses__ is a standard Python method.

This works for other areas too, operators, menu's, (any class which can be registered).



To run Multiple times you need to check if the class has a specific RNA attribute:

import bpy
for pt in bpy.types.Panel.__subclasses__():
    if pt.bl_space_type == 'VIEW_3D':
        if "bl_rna" in pt.__dict__:   # &lt;-- check if we already removed!
            bpy.utils.unregister_class(pt)


Note that this making use of an internal attribute and is not a documented part of the Python API, its used for Blender's own tracking of classes.