Iterate over the blocks collection (which includes layouts), and then over the objects within each block (i.e. the objects in every block definition and layout), and use a conditional expression to test whether the object resides on the target layer, deleting if so.
Something like:
)
)
)
)
)
(LM:odbx '
(lambda ( doc
) (doit doc
"YourLayer")) nil t
)