Getting back 5% deposit from landlord at vacation

How to get back 5% deposit from landlord when vacating the house? On what grounds can the landlord deduct the amount? If there is a dispute, what recourse do I have?