New desktops get randomly created

Solution 1:

I have the same issue and I'm looking for a solution. However, I think I know the cause...

When you unplug a monitor the OS creates a new Desktop for the lost screen and moves all the windows onto your laptop screen. When you plug back in it thinks you want that extra Desktop so it doesn't re-use it for the monitor, then when you unplug again it creates a new one. For people who rarely use the Desktops / Spaces feature (or mission control) these extra desktops can build up and you only notice them on the rare occasions you go into mission control. I sometimes find 20 or more Desktops there.

I'm not sure if this is exactly correct, or how to solve it, but I think this is what causes multiple Desktops to keep appearing.