If you rent, contact your landlord about changing the name on your lease once your divorce is final. If you don't and you are staying in the apartment, your ex-spouse will have legal rights of access to it. On the other hand, if you're the one leaving the apartment, you don't want to be responsible for paying any rent not required by your settlement agreement. For example, if your spouse is sued by the landlord for non-payment, and your name is still on the lease, you could be named in the suit. A money judgment could then be entered against you for back rent due, without you even knowing it.
There is a recent issue in landlord-tenant litigation that has far more serious consequences than just being sued for unpaid rent, and that's blacklisting. Housing Court now sells the names of litigants in cases to background checking agencies. That means if you're named in a lawsuit because your ex-spouse is being sued or evicted, you'll also be on the blacklist. If you ever want to move to another apartment, your new landlord is very likely to find out about your being named in the case through a routine background check, and may not want you as a tenant. To get into a new apartment, you may have to pay a significant amount of rent in advance, or a higher security deposit.
You could be exposed to this after a divorce even though you may have followed the terms of your divorce settlement agreement precisely, and are not at fault in any way with regard to your spouse's apartment. If you had a rent-stabilized or rent-controlled apartment, your spouse will then probably move to a new location at a much higher rent, and may sue you to cover the additional cost. If you have children, not only does it raise issues as to the suitability of their living arrangements, but you can be more liable for additional child support payment based on their increased needs.
There's also the possibility your spouse may deliberately not pay the rent, to precipitate circumstances that result in a move to a better apartment, which you have to pay for.
An additional concern is the luxury decontrol provision of the rent stabilization code. If the apartment you shared while married is rent-stabilized, and the rent is currently over $2,000 a month, your spouse may lose rent-stabilized rights if the household income exceeds $175,000.
An experienced landlord tenant attorney can help you with these matters. The first issue to deal with will be whether or not the landlord will change the name on the lease. Your divorce settlement should be very clear and precise about changing the names on the lease to avoid your being exposed to the liability of being sued for your spouse's nonpayment of rent. Your settlement could stipulate that any additional rent or security deposit payments you incur as a result of nonpayment or being blacklisted is either subtracted from the maintenance you pay, or are considered as a credit towards it.
No protective measure is foolproof. Even with this provision, the Court may still order you to pay for the cost of a new home at a higher rent, in the form of increased child support. However, you're still safer having it in your settlement agreement than not.