Chapter 7 bankruptcy is a process that protects you from collections and lawsuits. The bankruptcy court appoints a trustee to liquidate (sell) your assets to repay secured creditors. A secured creditor has a claim on property if you default on a loan; an unsecured creditor has no such claim, and Chapter 7 will eventually discharge (cancel) such a debt. Since you have not pledged any property as collateral for rent, the bankruptcy laws consider any back rent you owe at the time of filing as an unsecured debt, and can thus be discharged. A trustee in a Chapter 7 claim may set aside the lease contract while the case remains open; any contracts you sign after the discharge are binding.
If you wish to stay in your apartment, you may assume the lease by signing a new, supplemental agreement with the landlord. This will set the terms by which the landlord continues to rent you the apartment, subject to your bringing any back rent current and making future payments in full and on time. Generally, landlords will not waive their right to past due rent in a lease-assumption agreement, but sometimes they will negotiate terms to avoid having their rent discharged in bankruptcy.
You also have the option to break or "reject" the lease by not paying rent. The law requires you to either assume or reject all executory contracts within 60 days of the date you file the bankruptcy petition. The law does not allow eviction proceedings while you are in bankruptcy, unless the landlord has won a court judgment and the right to repossession of the apartment before you filed. During the bankruptcy case, the court's automatic stay prevents any legal action against you for debts, including rent. After discharge, however, you will no longer have any right to stay in the apartment.
Advantages of Discharge
If you are in dire straits financially, discharging past-due rent can help with the "fresh start" afforded by Chapter 7 bankruptcy. However, with a discharge, eventually you will lose your abode unless you can come to an agreement with the landlord. You should carefully consider the pros and cons of an assumption agreement before you file for bankruptcy, and you should also arrange for alternative lodging well in advance, if possible. It is not easy to find a new apartment or home for rent, with a recent bankruptcy on your credit report.