Nip Something in the Bud
to prevent a small problem from getting worse
by stopping it soon after it starts.
The strike was nipped in the bud by some clever negotiation.
to stop something before it has an opportunity
to become established:
Many serious illnesses can be nipped in the bud
if they are detected early enough.
It's important to nip this kind of bullying in the bud.
Halt something at an early stage,
or thoroughly check something.
For example, By arresting all the leaders,
they nipped the rebellion in the bud.
This metaphorical expression,
alluding to a spring frost that kills flower buds,
was first recorded in a Beaumont and Fletcher play of 1606-1607.