The onion maggot is the larva of a small grayish fly, similar in life cycle to the cabbage maggot. The adult lays white eggs in the soil at the base of onion-family plants, especially in the cool, damp weather of spring. The hatching maggots burrow into the developing bulb and tunnel through it. In young seedlings this often kills the plant outright: the leaves wilt, yellow from the base, and the seedling flops over. In larger onions the tunneling opens the bulb to rot, ruining it for storage even if the plant survives the season.
How to identify the problem
Onion maggot damage looks at first like generic seedling collapse. Young plants wilt, yellow, and fall over, often in clusters along the row. Pull a failing plant and slice into the base of the bulb or stem: onion maggots are slender, legless, white maggots, and you will see the brown tunnels they leave. Rotting, mushy bulb tissue around those tunnels is common. Damage tends to be worst in cool, wet springs and in beds where onions grew the previous year.
How to prevent them, step by step
The plan
Cover from planting
Lay a floating row cover over the bed at seeding or transplant and seal the edges with soil, so the fly cannot reach the soil at the plant base to lay eggs. This is the most reliable single step.
Rotate the onion family
Move all onion-family crops well away from where they grew last year. The flies overwinter as pupae in soil near old beds, so rotation cuts the population that emerges to attack new plantings.
Destroy infested plants and culls
Pull and destroy any infested plants promptly, and never leave cull onions or thinnings lying in or near the bed. Decaying onion material is a magnet and a breeding site for the fly.
Avoid the peak flight
The first generation flies in cool spring. Where pressure is high, adjusting planting timing can help young plants establish past the most vulnerable stage.
Keep the cover on
Because we harvest the bulb and leaves, not pollinated fruit, you can leave the row cover on through the vulnerable period without worrying about pollination.
Row cover is the backbone of prevention
The most dependable defense is to keep the egg-laying fly away from the base of the plants. A floating row cover sealed at the edges from planting onward physically excludes the fly during the cool spring weeks when it is laying eggs, which is precisely when young onion-family plants are most at risk.
Which plants are at risk, and how to plan
Onion maggots attack the entire onion family: onions, garlic, leeks, and scallions are all hosts, with onions usually the hardest hit. Direct-seeded onions in their first weeks are especially vulnerable to outright loss.
Use the planting calendar for your ZIP to know when your onion-family crops go in, so you can have row cover sealed from planting day and plan a clean rotation away from last year's bed. Knowing your frost dates helps you avoid setting plants into cold, slow-growing conditions that keep seedlings in the vulnerable stage longer during the spring fly's peak.
What are the signs of onion maggots?
Young onion-family plants wilt, yellow from the base, and topple over, often in clusters along the row. Slicing into the base reveals slender white maggots and brown tunnels, with rotting tissue around them. In larger onions the tunneling opens the bulb to rot, ruining it for storage. The combination of collapsing seedlings and tunneled, rotting bulbs confirms onion maggots.
How do I prevent onion maggots?
Exclude the egg-laying fly with a floating row cover sealed over the bed from planting, rotate all onion-family crops away from last year's location, and destroy infested plants and cull onions promptly so they cannot become breeding sites. Adjusting planting timing to avoid the peak spring flight helps where pressure is high. There is no way to reach the maggots inside the bulb, so prevention is the whole strategy.
Can onion maggots be sprayed?
Not effectively at the larval stage. Once the maggots are tunneling inside the bulb, foliar sprays cannot reach them, which is why control focuses on excluding the adult fly before it lays eggs and on removing the decaying onion material that breeds new flies. Row cover, rotation, and sanitation are the tools that actually work.
Does crop rotation help with onion maggots?
Yes. The flies overwinter as pupae in soil near where onion-family crops grew the previous year and do not travel far to find a new bed. Moving the onion family away from the old bed, and keeping it out for a couple of seasons, reduces the number of flies emerging to attack your spring planting, which is most effective combined with row cover and good sanitation.
The bottom line
Onion maggots tunnel inside the bulb where no spray can reach them, so prevention is everything. Seal a floating row cover over the bed from planting, rotate the onion family well away from last year's spot, and destroy infested plants and culls so they cannot breed more flies. Time it against your planting calendar and frost dates so plants establish before the spring fly peaks, and your onions, garlic, and leeks make it to harvest clean.

