How To Prevent Pesky Onion Maggots In Your Garden

There are a few things that can make vegetable gardening difficult, like root maggots in the onion patch.

Do you ever have trouble with root maggots? 

Read on.

In this blog, we will talk about the life cycle of an onion root maggot, signs of onion root maggot damage, and ways to prevent onion root maggots.

The Life Cycle of Onion Root Maggots

Root maggots are larvae of the Delia Antiqua fly.  The adult flies of this species are grey in colour and resemble a regular housefly, but they are significantly smaller. They only measure ¼” (0.64 cm) long.

This fly has a very refined palate, and only loves members of the allium family.  Members of the allium family include all types of onions, garlic, chives, shallots, and leeks.

An adult onion root maggot. Image credit Vladimir Bryukhov via

The entire life cycle of the Delia Antiqua fly takes 3-4 weeks from egg to adult.

Root maggot pupa overwinter in the soil.  The pupal stage is the one in where they have passed the larval stage and morph into adults.  This phase pauses during the winter months until the weather warms up.  The scientific name for this phenomenon is called “diapause”.

As spring weather warms up soil temperatures – and in the Edmonton area, that’s the middle of May – the Delia Antiqua quickly complete their pupal stage and emerge from the soil as adult flies.   Their one goal at this point is to perpetuate their species.

Being attracted to onion odour, the adults mate near onions. All their mating is done within 2-3 days.

Delia flies lay their white coloured eggs at the base of the onion stems.  

Egg to larva development takes about 2 weeks. Once the eggs hatch, the larvae emerge as creamy white legless maggots. The larvae then tunnel over to the onion to feed on the tender and juicy baby roots and soft stems.

Onion maggots prefer cool moist soil full of organic matter because it makes it easier for them to move around.  Once a root maggot is done with one onion, it just tunnels over to another for more food.

The maggots continue to feed until they get about 1 cm in length & then they bury deeper into the soil to pupate into an adult.  Pupae don’t feed during this stage of metamorphosis.

In Canada, we can see 2-3 generations of this Delia fly cycle spanning from July to August, but the worst batch is the first set that appears in early spring.  The subsequent groups don’t tend to bother onions that much.

maggots on the root of an onion
Onion root maggots. Image credit Rasbak via Wikipedia.

Signs of Onion Root Maggot Damage

Damage to onion roots results in a less vigorous plant because it’s ability to take up nutrients through the roots has been compromised.

The extent of the damage depends on what stage of growth the onion is at when the injury occurs.

If it is early on and the plant is very young with just 2-3 leaves; the result is yellowed leaves, wilting, and eventually the entire plant dies. At this point, it’s best to just put the onion out and either turn over or till the soil to expose the maggots so they will die.

If the damage is done when the onion is more mature, it will leave scarring on the onion bulb and possibly cause it to become deformed, but the onion will live.

How To Prevent Onion Root Maggots

Once you have root maggots, they can be tough to get rid of, but there are a few things you can do to prevent them at the outset:

Crop Rotation

Crop rotation is the practice of moving where you grow the different components in your garden each year.  It essentially keeps bugs guessing.

If you grow the same vegetables (and flowers) in the same spot year after year, it encourages the development of large populations of pests that affect a particular plant.

By changing up where you grow things, it encourages a healthier balance of microbes and other garden pests by keeping those populations down.

Related: The Beginner’s Guide To Crop Rotation

Distribute Onions Throughout The Garden

The Delia Antiqua fly is attraction to the odour of onions because of the sulphur based compounds in their leaves.

In research done by the University of Saskatchewan, when non-sulphur emitting plants were inter-planted or co-planted with the sulphur based ones, it seemed to confuse the flies and reduced egg laying was seen.

So try growing your onions in different clumps around the garden, rather than all in one row, or all together.

Plant Onions Later In The Season

Planting later in the spring will avoid the 1st generation egg laying.  The Delia Antiqua usually emerge from the soil after pupating around the middle of May.

If you were to delay planting onions until June 1st, you will miss the entire event.  Planting later won’t hurt the size of the onions –  they will still grow big and healthy.

Use Onion Transplants

Onions grown from seed are more susceptible to root maggots than onion transplants because transplants are bigger and stronger as they start growing.

Use A Crop Barrier

Crop barriers reduce the use of chemicals on the food you are growing.  They create a physical obstacle or an obstruction for the flies and make it difficult for them to either lay their eggs or have access to the crop itself.

Some examples of crop barriers include: 

Wood Ashes or Diatomaceous Earth

Placing wood ashes or diatomaceous earth around the base of the baby onion transplants discourages egg laying because the flies can’t get to the right spot their eggs. A layer of thickness of ½ cm or ¼” is recommended.

 Floating Row Covers

Floating row covers are fine mesh fabric tubes that you place over the threatened crop. Remember to check that rain and sunlight can penetrate the cover.

Some people place row covers over cabbage, cauliflower, or other cole crops to prevent cabbage butterflies from laying their eggs on those types of vegetables.

This is the same idea for onion root maggots. Row covers are used to keep flies from laying eggs.

Be sure to set the floating row cover over onions before mid- May after you have seeded or planted your onions.

The adult flies emerge around the middle of May and you don’t want to trap the flies inside.

Keep the floating row cover in place at least until the end of May.

Yellow Sticky Traps

This is an old fashioned method, but it does work. We still use them in the greenhouse.

These traps capture these pesky little flies without using chemicals.

Attach them to stakes or sticks and place them near your onions.

Keep Your Garden Clean of Onion Debris

Knowing that these flies are attracted to onions, getting rid of onion debris helps to keep them out of your garden.

Clear out any left over onion leaves as you garden during the summer, and also after you have cleaned your garden in the fall.

Avoid Using Fresh Animal Manure in the Garden

Fresh manure attracts all kinds of flies, including the Delia Antiqua.

Using well cured manure will prevent this from happening

Encourage Natural Predators

Beetles and wasps are natural predators of the Delia Antiqua fly, so encourage them to make your garden their home.

Beetles are attracted to spicy, musky, and fruity smells.  Try to incorporate raspberries and other fruits like Saskatoons near your garden.

For more information on attracting bees and other great insects to yo ur garden, check out our blog How To Grow a Pollinator Garden.

Onion Root Maggots – In Closing

Thank you for stopping in for this discussion on onion root maggots.

If you have questions about this or any other aspect gardening, please feel free to contact us via email or give us a call on the phone.

We delight in helping you to make gardening a good thing!

– by Sharon Wallish Murphy

About The Author

Sharon Wallish Murphy
Sharon grew up in the Wallish Greenhouse at the heels of her father, Charlie, who mentored her. Sharon’s passion is to share the love for growing and to empower others to find joy in their gardening journey, just like her dad.

  • Get the latest from Wallish Greenhouses


    Wallish Greenhouses is a locally-owned Sherwood Park greenhouse located just off of Highway 21 in Edmonton. We’ve got a rich history and have been serving Albertans just like you since 1919.