Bhagavad Gita 6.35

भगवान श्रीउवाच |
असंशयं महाबाहो मनो दुर्निग्रहं चलम् |
अभ्यासेन तु कौन्तेय वैराग्येण च गृह्यते

Translation

Lord Krishna said: O mighty-armed son of Kunti, what you say is correct; the mind is indeed very difficult to restrain. But by practice and detachment, it can be controlled.