Shortly before your lease ends, you should let your landlord know if you’re staying or moving out. Most leases will require at least 30 days’ notice before you leave, although yours might specify a different period.
If you need to move out before your lease is up, talk to your landlord. While he or she won’t be happy that you want to break the lease, you might get permission to sublet the apartment or house, which means another tenant could take your place until the lease expires. Or your landlord might allow your lease to expire early. If you break your lease, don’t be surprised if your landlord subtracts the cost of finding a new tenant from your security deposit — many leases include this provision.

Whatever you do, don’t just move out early without telling your landlord — it’s generally against the law to do so, and you probably won’t get your security deposit back. By leaving early, you’re leaving that money on the table, not to mention possibly getting yourself sued. Your landlord could even get a judgment against you in court if you skip out on your lease.
When you do move out, leave the place in spotless condition and in good repair — you’ll have a better chance of getting your entire security deposit back. Leave a forwarding address so your landlord can mail it to you. Legally, he or she may have up to 30 days to give your security deposit back. But be prepared: You may have to follow up.
When you move in with roommates, it’s smart to sign a roommate agreement that puts your living arrangements in black and white:
How often the place will be cleaned
Who does what
How will overnight guests be handled
What household items each of you will provide
How bills will be divided and paid
While it may not always be enforceable in a court of law, at the very least the agreement can ease communication about touchy subjects. And if one roommate consistently breaks the rules, you can refer back to the agreement or even use it as leverage to get him or her to move out.