What to do now
Mildest step first.
- Cover rows with row cover or fine insect mesh after planting, in a bed that didn't grow onions last year.
- Clear culls and debris right after harvest — rotting onions draw egg-laying flies.
- Plant onion-family crops at least 20 feet from last year's onion bed.

Symptoms
- Seedling onions yellowing and wilting at the base despite adequate moisture — larvae are feeding inside the stem at the soil line
- Transplanted onion sets with softened, rotting bases when pulled — maggots tunneled into the bulb
- White maggots, up to 1/3 inch long, found inside the base of affected plants or at the soil surface nearby
- Adult flies (small gray-brown, resembling a housefly) hovering near the soil at the base of onion rows in spring
- Bulbs harvested early showing brown tunneling and secondary soft rot where bacteria colonized maggot entry wounds
- Entire short rows or clusters of onions dying together — females lay eggs at the base of multiple plants in one area
Could it be something else?
- Thrips: Thrips leave silvery streaks and white flecks on onion leaves, and tips may brown, but the bulb base stays firm with no maggots inside.
- Fusarium basal rot: Basal rot browns and softens the bulb base, often with white mold on the root plate, and leaves die back from the tips. Check for tunnels and maggots; maggot wounds can let basal rot in, so both can occur.
What to do
Do now
- Cover onion rows with or fine insect mesh immediately after planting sets or seeding — this is the primary home-garden control
- Delay spring planting by 3–4 weeks past the first fly emergence window to miss peak egg-laying, if your season permits
Prevent next time
- Rotate onion family crops to a different bed each year — larvae pupate in soil near the previous crop and emerge close to where they developed
- Remove crop debris promptly after harvest; do not leave onion culls in the garden, as decaying tissue attracts egg-laying females
- Avoid planting near last year's onion bed — a buffer of at least 20 feet reduces but does not eliminate risk
- Apply beneficial nematodes (Steinernema feltiae) to the soil around onion plants at planting time to target larvae in the soil — effectiveness varies by soil temperature and moisture
By type of fix, mildest first
- Plant onion-family crops at least 20 feet from last year's onion bed.
- Clear culls and debris right after harvest — rotting onions draw egg-laying flies.
- Cover rows with floating row cover or fine insect mesh right after planting — in a bed that did not grow onions last year, so flies do not emerge under the cover.
- Beneficial nematodes (Steinernema feltiae) in moist soil around onions at planting time; results vary with soil temperature and moisture.
When to call your extension office
If maggot damage is occurring despite row cover, an extension specialist can help determine whether the cover is being applied and sealed properly and whether your regional fly flight timing requires adjusting your approach.
Life cycle
The onion maggot fly overwinters as a pupa in soil and emerges in spring, often around the time lilacs bloom. Females seek out freshly transplanted or germinating Allium plants by scent and lay eggs at the base, just below the soil surface. First-generation larvae feed inside the stem and bulb base; when large enough, they pupate in the soil. Two to three generations occur through the season; the first generation tends to cause the most stand loss, while later generations tunnel into maturing bulbs. Damaged bulbs frequently develop secondary bacterial soft rot that makes the entire bulb unusable.
Affects
Sources
- Onion Maggot — University of Minnesota Extension
- Onion Maggot (Delia antiqua) Fact Sheet — Cornell University Department of Entomology
Spot a mistake on this page? Tell us
- GarlicThe crop you plant in fall and harvest next summer — the longest timeline in the vegetable garden.
- Garlic Chives (Buchu)Flat, garlic-flavored leaves you can cut to the ground several times a season — and white late-summer flowers that seed freely.
- LeekA long-season allium that rewards hilling with a foot of white shank.
- OnionA day-length sensitive allium — plant the wrong variety for your latitude and you tend to get a handful of scallions instead of bulbs.
- ShallotA bulb-clustering allium with a milder, sweeter flavor than its onion cousin.
- Why are my onion seedlings falling over or so thin?Thin, grassy onion seedlings that flop over indoors are normal. Trim the tops back to about 4 inches once they reach 5 inches, keep a light close above them, and keep them cool, and they get sturdier. Seedlings that collapse with a pinched, brown stem at the soil line have damping-off. In the garden, young onions that wilt and die a few in a row point to onion maggots, and plants that stay thin are usually crowded, weedy or dry.
- Why are my onion tops falling over?If bulbs are full-sized and the necks are softening late in the season, it's maturity: harvest once half to two-thirds have fallen. Tops collapsing early, with yellow tips or rotten bases, point to thrips, onion maggot or rot.