How do you disable a secondary display on a Mac?
Since SwitchResX is not free, I have developed a simple free alternative, that allows you to turn off a specific Monitor.
https://github.com/Eun/DisableMonitor/releases
The only thing I can come up with which worked for me was to turn on mirroring (in the monitor menu in your menu bar, or in the screen preferences pane) and then turn off the secondary display. Spaces will then only show one display.
When you want it back (for watching movies, etc.), turn on the display and turn off mirroring.
This solution feels very kludgy to me, so I'm hoping there's a better answer (like 3rd-party software or a hidden pref which can be set via Terminal). But it should suffice for the short term.
Sorry this happens to be a year later, but I was just looking for a way to disable my secondary display and came across SwitchResX. It has a taskbar menu item to quickly disable any connected monitors.
I'm not sure if this will solve your Spaces issue, but it might be worth a try.