Garden pest · Insect

Onion maggot: how to spot them and stop them

The onion maggot is the larva of a small gray fly that feeds on the underground parts of onions and their relatives. Look for seedlings that wilt and die and bulbs with tunnels and rotting patches near the base.

Delia antiqua · From university extension guidance, checked October 2026

How to identify onion maggot

  • Adult: a gray to grayish-brown fly about 1/5 to 1/4 inch (5 to 7 mm) long that looks like a small house fly.
  • Eggs: white and elongated, about 1/20 inch (1.1 to 1.3 mm) long, laid in the soil at the base of onion plants.
  • Larva: a cream-colored, legless maggot up to about 1/2 inch (7.5 to 12 mm) long when grown.
  • Pupae: about 3/16 to 1/4 inch (4.5 to 7 mm) long, found in the soil.
  • It looks very much like the seedcorn maggot. A sure identification may need a microscope.

The damage they do

  • Stunted or wilting onion plants are the first sign. Injured seedlings wilt and die.
  • Maggots tunnel into the base and bulb, leaving dark, decaying patches near the base of the bulb.
  • Lightly damaged onions may survive but are more prone to rot, and they can rot in storage and spread rot to other onions.
  • Heavy infestations can wipe out an entire stand if nothing is done.

Crops they attack

Also: garlic chives, wild onions, volunteer onions.

Life cycle

It spends the winter as pupae in the soil, and adults emerge from late April through May to lay eggs at the base of onion plants. There are usually three generations a year in the North; the first generation does the most harm to seedlings, and cool, wet weather favors the maggot.

How to prevent them

  • Cover onions with floating row cover at planting to keep egg-laying flies off the plants.
  • After harvest, remove and dispose of leftover bulbs, culls, and volunteer onions rather than working them into the soil. Control wild onions too, since they host early-season maggots.
  • Rotation has limited value in a home garden. Cornell found it reduces risk only when the new planting is more than 1 mile (1.6 km) from last year's onions, and UMaine calls it impractical for home gardeners.
  • Planting a little later can put seedlings out of step with the first generation, since flies prefer larger, earlier-planted onions. Late planting may mean smaller bulbs. Transplants are also less vulnerable than direct-seeded onions.
  • Avoid injuring plants during weeding, because damaged plants attract egg-laying flies. Highly organic soils may draw more flies, and fresh manure and crop residue are a known risk for the related seedcorn maggot.

How to get rid of them

  • There is no curative treatment once maggots are in the plants; management is preventive. Remove and dispose of wilted, infested plants.
  • Commercial growers rely on seed treatments and transplant drenches, including spinosad. Sprays aimed at adult flies are not effective. Use only products labeled for onions and follow the label.
  • Beneficial nematodes (Steinernema feltiae, Heterorhabditis bacteriophora) and insect-killing fungi such as Beauveria bassiana can infect maggots. Results vary with soil conditions. Follow the label.

Natural enemies

Ground beetles, rove beetles, parasitoid wasps, birds, insect-killing fungi, beneficial nematodes. Flowers like dill, cilantro, calendula and sweet alyssum feed many of these predators; see the companion planting checker.

Onion maggot: common questions

Why are my onion seedlings wilting and dying?

Onion maggots are a common cause. Pull up a wilted plant and check the base for small cream-colored maggots and decaying tissue.

Does crop rotation stop onion maggots?

Not much in a home garden. Cornell found rotation reduces risk only when the new onion planting is more than a mile from the old one, so focus on row covers and removing leftover onions instead.

Are some onions resistant to onion maggot?

No onion varieties are truly resistant. UMaine notes that white onions are more susceptible than others, and a Japanese bunching onion has sometimes shown some resistance or tolerance.

Plan a garden that's harder to attack

Rotation, trap crops and flowers for predators all start with the plan. Gardentasia checks companions and rotation as you plant, each with the reason.

Open the free planner

Free, in your browser. No account, no download.

Sources