I tried that :
https://www.cambam.co.uk/forum/index.php?topic=7795.msg62454but it seems not working :
The deleted layer is still visible, the entities within disappeared, but are still present.
Somewhat strange.
I looks like a kind of update is missing.
But if I try the method Update, CB wants to save a CB file.
EDIT : After saving and reloading the CB-File the deleted layers are gone,
so just a kind of "refresh", "garbage collection" ... is missing ?
EDIT :
doing this in python script works fine , the layer view is updated immediately:
newdoc.SetActiveLayer(newdoc.Layers[0].Name)
newdoc.ActiveLayer.Entities.Clear()
newdoc.Layers.Remove(newdoc.ActiveLayer)