[HELP] How can i Batch delete layer and sublayer with object in it?

Thanks Anuj Modi

This is a good way, but I often have a lot of layers(maybe huge) with objects in them, maybe the status is locked, displayed, or not displayed, opened one by one, and the selection is also very cumbersome, is there any way to directly delete this layer and sublayer without any confirmation.