From time to time urban legends relating to family law matters get passed around. This morning one was passed my way. The scary thing about this legend is that it was attributed to an attorney (who should have known better).
Supposedly, if you file for divorce here in Missouri, you have to move out of your house and let your spouse stay. Here's the real skinny on that: All things being equal, you don't have to move out of your house just because you file a divorce here in Missouri. I can't vouch for other states (I don't practice in other states). But here in Missouri, all things being equal, you don't have to move just because you file for a divorce.
The kinds of things that make things not equal generally involve one of the spouses behaving badly. Such as - hitting, shoving, and other similar bad behaviors. In those cases, one or the other of the spouses will leave the house, whether voluntarily or otherwise.
Conversely, if you want to move out of the house when you file for divorce - you can do that. You just don't have to unless there is something about your particular situation that requires you to move.