If you're an international student or expat staying in the EU for six months or less, you are eligible for a VAT refund.
If you are staying in the EU longer than six months you can get a refund when you permanently leave the EU. To get a VAT refund you need to de-register from city hall. You will receive a confirmation of your de-registration for customs, to get proof of export.
Please note; you can only reclaim VAT over purchases made in the last three months before leaving the EU.