Nip it in the bud
Which means cut it off before it has a chance to grow.
McGraw-Hill Dictionary of American Idioms and Phrasal Verbs
to put an end to something before it develops into something larger.
- (idiomatic) To stop something at an early stage.
If you see a bad habit begin to develop, try to nip it in the bud so that it does not become ingrained. Issues are easier to sort out the earlier they are addressed.
Allen's Dictionary of English Phrases
nip something in the bud
to put an early stop to an activity, before it becomes established. A
metaphor from the practice of removing the buds of plants to
reduce their growth, and in early use often in the context of
feelings and passions. The phrase emerges in Elizabethan drama
from the 1560s on, first in the forms nip in the head and nip in the
blade, and Shakespeare in 2 Henry VI (1591) III.i.89 has York tell
King Henry 'Cold news for me, for I had hope of France, | As
firmly as I hope for fertile England. | Thus are my blossoms blasted
in the bud.' The earliest recorded occurrences of the phrase in the
form now familiar are in plays of Fletcher and Dekker from the
first decade of the 17th cent.
Lady Mary Wroth The Countesse of Mountgomeries Urania 1621
And all this was but melancholy, and truely that is enough to spoil any, so strangely it grows upon one, and so pleasing is the snare, as till it hath ruind one... This I have found and smarted with it; leave it then, and nip it in the bud, lest if blow to overthrow your life and happiness.
Dickens Pickwick Papers 1837
After great consternation had been excited in the mind of Mrs. Cluppins, by an attempt on the part of Tommy to recount how he had been cross-examined regarding the cupboard then in action, (which was fortunately nipped in the bud by his imbibing half a glass of the old crusted 'the wrong way', and thereby endangering his life for some seconds,) the party walked forth, in quest of a Hampstead stage.