Allium leaf miner, Phytomyza gymnostoma, is an insect pest of all Allium species; leeks, onions, chives, shallots and garlic. The larvae eat into the stems and bulbs of leeks, onions, chives and garlic and cause rotting by secondary bacterial infections. It is common in Europe and has been in the UK since 2002 where it was first found in the West Midlands. Since 2002 it has been slowly spreading using its limited flight capacity and by exportation with onions garlic and shallots.
The adult flies hatch in March and April from overwintering pupae and lay eggs at the base of all Allium species within about a one mile radius. The eggs hatch during May and June into a small "maggot" about the same length as a blowfly maggot, 5 to 6mm, but much thinner. The maggot eats its way through plant tissue leaving white patches of dead cells in the leaf. At this point the plants also show irregular growth with bending and reflexing of the leaves. At the end of the summer the larvae turn into small brown pupae about 3mm in length.
The pupae hatch into adults during September and October and restart the cycle, overwintering as pupae either in plant material or at the soil surface. Over the winter damaged plants will rot due to secondary bacterial and fungal infections. Rotting over the winter and discovery of pupae when harvesting /cooking is the most noticeable symptom for gardeners. The flies are too small and the leaf damage can easily be misinterpreted.
Pesticides are not really a sensible option for the home or allotment gardener. Even if you are happy to use them they cannot be effectively targeted. Organic controls are much more effective for the home gardener. They rely on breaking the life cycle at its weak point to prevent overwintering pupae from re-infecting summer grown Alliums.
The only real solution is meshing up overwintering Alliums when the adults are on the wing, i.e. mid-February to mid-April and September to mid-November, to keep them out, combined with crop rotation. Another effective measure is to delay the planting of summer onion sets until May or grow from seed and keep them in your back garden until May.
Damaged plants should be removed to your household green bin. High temperatures reached during commercial composting will kill off the pupae but it is unlikely that the temperature will be high enough for long enough in a home compost bin.
These may sound like severe measures but the alternative is no leeks or onions. It’s not a pest that you can live with and just "cut out the bad bits" like carrot fly or codling moth.