Skip to content
The Authority Suite
Sprout Authority
Problem & FixProblem guide

Onion maggots: how to prevent them

Onion maggots tunnel into onion, garlic, and leek bulbs, wilting and rotting young plants. Prevent them with row cover, rotation, sanitation, and good timing.

By Joel KellyUpdated Aug 1, 20266 min read2 sources

Evidence checked against University of Minnesota Extension and Cornell Integrated Pest Management. Review the source record.

Onion maggots: how to prevent them
On this page5 sections

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

1

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.
2

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.
3

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.
4

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.
5

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.

Some links on this page are affiliate links. As an Amazon Associate I earn from qualifying purchases.

AgribonSeason Extenders

EXCLUDE THE EGG-LAYING FLY

Agribon AG-19 Floating Row Cover

Under $25

Best for: Gardeners who want cheap frost protection and pest exclusion in one fabric.

Keep in mind: Lightweight fabric tears and wears over seasons

Full research
Weight
0.55 oz per sq yd
Frost protection
Down to roughly 28F
Light transmission
About 85%
Material
Spun-bonded polypropylene

A lightweight spun-bonded row cover that drapes over crops to add a few degrees of frost protection while still letting in light and water. It doubles as a physical barrier against many insect pests.

8.3/10 general product score

This catalog-wide research score is separate from this guide's use-case ranking. How we research

Strengths

  • Extends the growing season at both ends
  • Excludes many pests without chemicals
  • Passes most light and water so it can stay on

Weaknesses

  • Lightweight fabric tears and wears over seasons
  • Needs hoops or pins to stay put in wind

Sprout Score breakdown

Fit for purpose 30%
9.0
Owner sentiment 25%
8.0
Build quality 25%
7.0
Value 20%
9.0

Best for

Gardeners who want cheap frost protection and pest exclusion in one fabric.

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.

Evidence trail

Diagnosis and management sources

Original extension and institutional guidance behind the identification, biology, prevention, and management advice in this guide. Each source opens to the original publisher.

  1. Institutional guidance

    Cabbage and onion maggots

    University of Minnesota Extension · Checked Jul 26, 2026

    Supports onion maggot adult and larval identification, bulb and root feeding, wilting and rot, cool-season risk, row covers, rotation, sanitation, and preventive timing.

  2. Institutional guidance

    Onion maggot and seedcorn maggot (Delia antiqua and Delia platura)

    Cornell Integrated Pest Management · Checked Jul 26, 2026

    Supports onion maggot identification and biology, larval bulb damage, residue and cull sanitation, crop rotation, planting-time decisions, and prevention-focused management.

Check related symptoms and causes