Automatic Stay and Repayment Plan
When you file a petition for bankruptcy under either Chapter 7 or Chapter 13, the court issues an automatic stay. The stay prevents creditors, including landlords, from pursuing any further collection actions, including new civil actions for repossession of a home or apartment. As long as the bankruptcy case is proceeding and the creditor has not been granted relief from the stay, you can remain in your dwelling. But the court-appointed trustee in a Chapter 7 case has the authority to terminate the lease if he finds the rent is too high or it's an unacceptable use of your available funds. In a Chapter 13 case, a court trustee draws up a repayment plan and the debtor has the option to continue the lease within the plan, if he has the means to do so.
Relief from Stay
A landlord or any other creditor can petition for relief from the automatic stay. If the court grants the petition, the eviction proceeding can go forward. The court will schedule a hearing on the matter, at which time you can argue that the court should not grant the relief. Valid grounds may be that you've now caught up on the rent or mortgage payment; the landlord has violated the lease; or granting relief from the automatic stay would subject you to unfair and undue hardship. If you do not stay current with rent payments after filing for bankruptcy, the landlord can file for relief from the stay in order to collect the "post-petition" debt.
Judgment and Default
If you've already received an eviction notice, a court has granted a judgment and writ for repossession of the property. The creditor can go ahead with an eviction, even if you file for bankruptcy protection. Some states allow you to prevent this by certifying with the bankruptcy court that you intend to catch up on the rent within a time limit set by law -- usually 30 days. Your state may allow you to "cure" the default of rent payments in bankruptcy, even if a court has granted an eviction order. You must serve the certification on your landlord as well as the court that issued the eviction order, and then file another certification when you repay all past-due rent.
Exceptions to the Stay
If you have certified that rent payments are caught up, the bankruptcy court will extend the automatic stay to include your landlord and lease agreement, but you must continue to abide by the terms of the lease. If the landlord alleges any illegal activity or endangerment of the property, he can petition for relief from the stay and file for repossession once again.