There are many reasons you might want to leave your rental early, but a lease is designed to offer a landlord protection against exactly that circumstance. However, Pennsylvania law gives you the right to break the lease without consequences if you meet the legal requirements.
Break the Lease
Pennsylvania law gives several grounds for terminating the lease early. If you enlist in the military after signing the lease — including the National Guard and the commissioned corps of the Public Health Service — you can end the lease by mailing or hand-delivering written notice to the landlord. Once you send notice, the lease terminates 30 days after the next rent payment is due.
With a month-to-month tenancy, you can terminate your rental at the end of the monthly cycle. The Pennsylvania Bar says you should normally give your landlord 30 days advance notice that you're leaving, unless the rental agreement sets a different term. State law does not set a mandatory notice period.
Stopping the Rent
If you don't have a valid reason to leave or you don't provide adequate notice, the landlord can keep charging you rent for the rest of the term. Some states require the landlord to find a replacement tenant promptly, but Pennsylvania law does not. Even in a constructive eviction case, the landlord can sue you to collect the remaining rent. To win, you'll have to present proof your moving out was justified. Photographs of the unrepaired damage might do the trick, for example.
If you don't do everything by the book, your landlord can take the remaining rent out of your security deposit. It's simpler and easier than suing you. That's on top of any deductions for damage to the rental.
As long as you're on solid legal ground, the landlord must pay back your deposit, less deductions for repairs, within 30 days after you've moved out. You must provide him with a forwarding address. If he deducts any money from the deposit, he has to give you an itemized list showing how he spent it. You can sue the landlord if he doesn't pay back your deposit or provide an itemized list. You also can sue if you don't think the deductions are justified.