Yes, in many cases, filing for bankruptcy will stop an eviction and allow you to remain in your house or apartment. Because bankruptcy can entitle you to an automatic stay, it can relieve you of the ongoing worry of immediate eviction - even if your eviction is already underway. Bankruptcy is not a permanent solution to eviction, though.