Is there a permanent treatment to dandruff?

No. Fortunately, managing it is usually easy. Ketoconazole shampoo is often helpful and there are other adjuncts. Best wishes.