
You pull up a wilting broccoli transplant and the roots are gone — tunnelled into brown mush, with small white legless larvae still in them. Or a row of beans never comes up at all, and digging where the seed should be turns up the same thing.
That is a root maggot, and it is almost certainly one of three closely related flies. The useful news is that identifying which one barely matters, because the three respond to the same handful of measures. The unwelcome news is that by the time you are looking at the damage, this season’s crop in that spot is finished — root maggots are a pest you prevent, not one you treat.
This page covers what to do about that, honestly, including which of the commonly recommended fixes do nothing.
First — make sure it’s actually a root maggot. Three different things get called maggots in a garden, and only one of them is this page.
- In the soil, at the roots, on a plant that is wilting or failed to come up. White, legless, around a third of an inch, pointed at one end. That’s a root maggot. Keep reading.
- Tiny larvae in houseplant potting mix, with small dark flies hovering around the pot. That’s fungus gnats, which is a different problem with a much easier fix — see the fungus gnats guide.
- In your compost bin, dark, flattish, segmented, up to three quarters of an inch, and a lot of them. Those are almost certainly black soldier fly larvae, and they are not a pest at all. They are among the fastest decomposers you can have and they outcompete houseflies. Leave them be.
The three that matter
All three are Delia species, and the adults look so alike that even entomologists separate them mainly by which crop they are sitting on. The larvae are effectively indistinguishable by eye. What tells you which one you have is what it is eating.
| Which one | What it attacks | What you see |
|---|---|---|
| Cabbage maggot Delia radicum | Everything in the brassica family — cabbage, broccoli, cauliflower, Brussels sprouts, kale, turnip, radish. Cauliflower, Brussels sprouts, turnip and radish get hit hardest | Transplants wilt in the afternoon then recover, then stop recovering. Leaves take on a bluish cast. The plant lifts out of the ground with almost no resistance because the root is tunnelled hollow |
| Onion maggot Delia antiqua | Onions, and the rest of the allium family | Seedlings collapse. On bulbing onions the larvae work in behind the leaf sheath and into the bulb itself, and soft rot follows them in through the wounds |
| Seedcorn maggot Delia platura | Germinating seed of almost anything — corn, beans, peas, beets, spinach, onions, brassicas | Patchy or failed germination. You dig up the seed and find it hollowed out. Often blamed on bad seed or on damping-off |
It looks like three other things. Root maggot damage is routinely mistaken for damping-off (a soil fungus), for wireworm, and for simply bad seed. The three look similar from above ground and the treatments are completely different, so the only way to know is to dig. Lift the plant or excavate where the seed went in and look at the root. If there are larvae, there are larvae.
Why the timing matters more than anything else
All three overwinter as pupae in the top few inches of soil, emerge as adults in early spring, and lay eggs at the base of host plants or in freshly disturbed soil. Eggs hatch in two to four days once the soil reaches about 50°F. The larvae feed in the roots for three to four weeks, pupate, and the cycle repeats — two to four generations a year depending where you are.
The first generation does most of the damage. It arrives when the soil is cold and wet, seedlings are small and slow, and nothing is growing fast enough to outrun an injury. By late May or early June the pressure usually eases on its own. Plantings established after mid-June generally suffer far less.
The signal to watch for
You do not need a degree-day calculator for this, although there is one below if you like precision. The field indicator for cabbage maggot flight is yellow rocket (Barbarea vulgaris) coming into bloom — that bright yellow mustard-family weed on roadsides and field edges. When it flowers, the flies are moving. Onion maggot flight starts around the same time.
If you want the precise version, peak emergence of the overwintering generation lands at roughly 350 growing degree days base 40°F for seedcorn maggot, 450 for cabbage maggot and 725 for onion maggot. Most regional extension services publish a running degree-day total.
What actually works
These are in order of how much difference they make. The first three carry almost all of the weight.
1. Floating row cover, on at planting
This is the single most effective thing available to a home gardener. The adults have to land on the soil beside your plant to lay eggs. A physical barrier stops that outright, and nothing else on this list is that direct.
- Put it on the day you seed or transplant, not when you first notice a problem. By then the eggs are already in the soil.
- Seal the edges with soil all the way round. A fly only needs one gap.
- Put it straight back after weeding. A cover left off for an afternoon during peak flight is a cover that did nothing.
- Take it off once the first flight is over and the crop is large. A plant with a decent root system can shrug off injury that would kill a seedling, and brassicas need the pollinator access later anyway.
The one mistake that turns a row cover into a trap: do not use it over ground where the same crop family grew last year. The pupae overwinter in the top few inches of that soil. Cover it and the flies emerge underneath the fabric, land on exactly the host they want, and lay eggs with nothing to interrupt them. You have built them a nursery.
Row cover and crop rotation are not two independent tactics. The cover only works on rotated ground.
2. Plant later, into warmer soil
Cool wet soil is the whole problem. It keeps seedlings small and slow for weeks, which is precisely the window the larvae need, and it is the condition the flies prefer for egg-laying. Warm soil germinates seed fast, and a plant that gets its true leaves quickly stops being vulnerable — seedcorn maggot in particular can only damage seeds and seedlings, so a plant past that stage is simply out of reach.
For onions, a late-May planting is markedly safer than the first half of May. For brassicas, after mid-June is close to a free pass. Where you have had trouble before, split the difference: put in a small early planting you are prepared to lose and a main planting after the first flight.
3. Mind when you add organic matter — this is the seedcorn maggot one
Seedcorn maggot flies find egg-laying sites by smelling decaying organic matter. Which means that the thing you did to be a good gardener — turning in a cover crop, spreading manure or unfinished compost, tilling in residue — is also the thing that advertised the bed.
The rule: get organic matter in early enough to break down before you plant. Incorporate a cover crop at least four weeks ahead of seeding, and animal manure two to three weeks ahead. Avoid putting manure or unfinished compost on heavy soil in late autumn or early spring if you want to plant that ground early.
For brassicas specifically, don’t apply manure right before transplanting — it brings the flies to the plant.
One counterintuitive detail worth knowing: tillage radish is a poor choice as a fall cover crop ahead of cabbage. It’s a brassica, and it can carry cabbage maggot through to your spring planting.
4. Rotate, and rotate further than feels necessary
The pupae are in the soil where last year’s crop was. Moving the crop moves it away from them. The distance matters more than most rotation advice admits — onion maggot adults will travel up to a mile to find a host, so a shuffle to the next bed over is a smaller intervention than it feels like. Put host crops as far apart as your space allows, and keep at least two years between plantings of the same family in the same ground.
5. Beneficial nematodes, if you want a treatment that genuinely works
This is the one biological control with real evidence behind it for this pest. Steinernema feltiae — note the species, since the other commonly sold nematodes are aimed at different targets — has shown efficacy against cabbage maggot in trials, including at low soil temperatures, which matters for an early-spring pest.
- Timing: apply when eggs are hatching, which means at or just after the start of flight. Treating before the flies arrive wastes them.
- Rate: roughly 1 million infective juveniles per 1,000 square feet, watered in with enough water to saturate the top two inches. For transplants, trials needed 100,000 to 125,000 per plant to reduce damage — which is a genuinely high rate, so follow the product’s own figures rather than going light.
- How: as a drench to the transplant tray before planting out, or as a soil drench after, or both. If flight starts more than a week after you transplant, you will need the post-planting application too.
- Conditions: they need moist soil to move through and they die in sunlight. Water before and after, and apply early morning or evening.
- Storage: refrigerate, never freeze. They are alive, and a box left in a hot car is a box of dead nematodes.
6. Tidy up in autumn
Till under crop residue right after harvest. It exposes overwintering pupae to weather and to birds, and it removes the shelter they would otherwise use. For onions specifically, cull piles are the single biggest reinfestation source — a heap of rejected bulbs rotting at the edge of the plot is a breeding operation. Bury them deep or take them away entirely.
7. Look after the ground beetles
Ground beetles eat root maggot eggs, larvae and pupae, and in some settings account for a great deal of mortality. They are not something you buy — they are something you avoid killing. Broadcast soil insecticides take them out along with the target, which is a bad trade. Permanent plantings, undisturbed edges, mulch and stones give them somewhere to live.
8. Hill soil up around brassica stems
A salvage measure rather than a preventive one, but a real one: mounding soil around the stems of affected brassicas encourages adventitious roots above the damage. A plant that puts out a second root system can sometimes carry a crop despite losing the first one.
What doesn’t work, and why
Root maggots attract more bad advice than almost any other garden pest, for one structural reason: the larva spends its entire damaging life inside the root, underground. Anything you spray onto a plant, or onto the soil surface, is on the wrong side of several inches of soil and a layer of root tissue. That single fact disposes of most of what gets recommended.
Foliar sprays of any kind. Neem, insecticidal soap, garlic spray, hot pepper spray. The pest is not on the leaves. There is nothing for these to make contact with. Every reactive spray approach is ineffective here, and the control strategy has to be preventive.
Garlic, hot pepper or compost tea drenches. The appeal is that a drench at least goes into the soil. But a larva tunnelling inside root tissue is protected from it, and the concentration needed to reach it through soil would damage the plant long before it troubled the maggot. If a drench is going in, make it the nematodes, which actively hunt the larvae rather than waiting to touch them.
Diatomaceous earth around the stem. DE works by abrading the waxy cuticle of an insect that walks across it while it is dry. Root maggot larvae hatch at or just below the soil surface and go straight down — they barely cross the surface at all. And root maggot season is cool and wet, which is exactly when DE stops working, because damp DE does nothing. It is not harmful, it is just not a control for this.
Wood ash around the stem. Same reasoning as DE, with an additional cost: wood ash is strongly alkaline, so repeated applications shift your soil pH. That is a real change to your bed in exchange for no effect on the pest.
Companion planting to repel the flies. You will find lists of plants said to confuse egg-laying root maggot flies. The evidence behind them is thin, and the mechanism usually given — masking the host plant’s smell — does not hold up when the fly is landing on soil it can see. Grow those plants because they feed beneficial insects and because you want them. Do not grow them instead of putting a row cover on.
If you already have them
Honest answer first: for the affected plants, there is no rescue. The roots are gone and nothing you apply reaches the larvae inside them. What you can do is limit the spread and make the next planting work.
- Pull the affected plants and take them out of the garden. Don’t compost them — the larvae in those roots will happily finish developing in a compost heap and emerge as adults. Bag them, burn them, or bury them well away.
- Check neighbours before you decide how far it has gone. Damage is usually patchy. Lift one or two plants either side rather than assuming the whole row.
- Wait before you replant that spot. If the maggots you found were around a quarter inch long, give it at least five days so they pupate. If they were smaller, wait at least ten. Replanting into soil with active larvae simply feeds them.
- Change what goes there. Replant that bed with something from a different family, and put the brassicas or onions somewhere else.
- Hill up the survivors, if they are brassicas, as above.
A season that avoids the problem
| When | What to do |
|---|---|
| Previous autumn | Till crop residue under straight after harvest. Remove or deeply bury onion culls. Plan next year’s rotation so brassicas and alliums move as far as possible — and don’t put tillage radish where cabbage will go |
| Four weeks before seeding | Incorporate cover crops. Two to three weeks before, any manure. Then leave the ground alone |
| Yellow rocket in bloom | First flight. If anything susceptible is going in now, it goes in under cover, on rotated ground, sealed at the edges |
| At transplanting | Row cover on the same day. Nematode drench in the transplant water if you have had damage before |
| Through the first flight | Cover goes straight back after every weeding. Keep soil moist if nematodes went in |
| Mid-June onward | Pressure drops sharply. Covers off, main plantings in, and the rest of the season is largely free of it |
If you do one thing: row cover, on at planting, over ground that did not grow the same family last year. That one combination prevents more root maggot damage than everything else on this page put together.
Related guides
- Fungus gnats — if the larvae are in houseplant potting mix rather than garden soil
- The pest triangle and crop rotation — why rotation works and how far to move things
- How to build healthy soil — drainage and structure, which decide how long your soil stays cold and wet
- Compost 101 — including what the larvae in your compost bin actually are
Sources
- Maine Organic Farmers and Gardeners Association. “Seedcorn Maggot and Other Maggots.”
- University of Massachusetts Extension, Center for Agriculture, Food and the Environment. “Onion Maggot.”
- Cornell University College of Agriculture and Life Sciences, Integrated Pest Management. “Seedcorn Maggot IPM.”
- Sound Horticulture. “Cabbage Root Maggot Tech Sheet.”



