nip something in the bud : Popular Idioms in English

nip something in the bud

To stop in the early stages

With all the stress at work, Roger had starting biting his nails, but it was a nasty habit and he was determined to nip it in the bud.