How do I destroy all actors of a class less the one I'm on it.

So I’m doing a procedural room maker spawning the same room every time but when I enter the new one I wanna destroy the one I left behind