I use my MacBook at work and at home. Whenever I switch between work and home, every now and again I get bug whereby the Mac thinks an external monitor is still plugged in, even if it's not.
This means when I go to plug in either my work or home monitors, one of them doesn't work as OS X still thinks there is a different monitor plugged in.
The only way I've been able to fix this is to restart, but I was hoping there was a quick way to fix this through a terminal command or something.
Note that System Preferences > Displays > Option + Detect Displays does not work.