Ok, I had trouble with this, so here's a full explanation.
First, you need to determine what sectors you want cleared of enemies.
Next, give them all the same tag (tag 1 in this example)
Then, create a control sector (control 1). Give it a tag of 2
On one linedef, create an invisible, intangible, FOF (lindef 58 ) over the area you want cleared of enemies (give the FOF lindef a tag of one...make sure the hight reaches to the ceiling and the floor)
On the same sector, create a lindef type 15 (trigger once, no more enemies), and give it a tag of 2. *important point* note the lindef length (in this example, 32 units) When you mouse over it, the control 1 sector should light up with the lindef 58 on it.
Create another control sector with what you want to happen on it after the enemies are gone (like move sector ceiling..). Give the trigger lindef (98 ) a tag of 32 (the length of the no more enemies tag).
If you tag the after-enemies effect correctly, then it will work. As a bonus, when testing, type *devmode on* into the console. You will get a lot of numbers on the right, but more importantly, when you kill all enemies in the room, you will see a line in the upper-right corner (now running a linedef 15 no more enemies with a tag of 32).
that's it, let me know if it doesn't work. You can pm me the wad if you can't get it and I'll try to fix it.
I don't know if it works for bosses, but for regular enemies, it should be fine.