Meaning: stop something from happening before it gets too far along
Example: When the students decided that they wanted to go on a two week skiing trip the teacher had to nip it in the bud and tell them that it would not be happening.
See this Idiom in a story: The Most Unruly Class in the World