It should say in your lease under what terms the security deposit can be used. I can use security for back rent as well as damages to the unit (including cleaning).

However, it is not the same in every state.

Check with your local HUD office.

Make sure your landlord goes through a move out inspection with you so you know exactly what is planning to deduct for. Also, you may be entitled to see invoices for any of the work he claims to have had to do on the condo due to your living there.