# How to remove every inactive/unused screens in python?

in blender you can easely create thousands of screens. i'd like to have every screens from bpy.data.screens that are not visible deleted, how can i do that ?

i know that

for screen in bpy.data.screens:
bpy.ops.screen.delete({'screen': screen})


delete every single screens, that's a goo thing, but i don't know how to detect the visible/invisible ones ?

• maybe check their size? – HenrikD Jun 14 at 22:13