Why does Mac Yosemite open dozens and dozens of empty desktops? [duplicate]
Solution 1:
It has to do with the 'separate space' feature for external displays Apple introduced in OS X 10.10 Yosemite: If the setting "Displays have separate Spaces" in System Preferences -> Mission Control is activated (see https://support.apple.com/kb/PH18809?locale=en_US), every time you hook up a display a new space will be created for that display. After you pull the plug, OS X will not delete that created space, hence accumulating lots of spaces over time.
If you don't activate the option, you're external display will behave like before 10.10: only one menu bar on the main screen etc.
Solution 2:
It is not normal behaviour to have multiple (in your case dozens) of extra Spaces being created via Mission Control.
I looked at System Preferences >> Keyboard >> Shortcuts >> Mission Control, but there is no shortcut for creating a new Space. As such, it wouldn't be that you are inadvertently creating Spaces using a shortcut.
Now, when you go full-screen with an application (e.g., Safari), then that window will become its own Space. However, when the window is closed, or restored to its original size, it will return to its original Space.
Considering your situation, I would submit the issue as a bug that Apple needs to address.