White larvae wriggling on the surface of the substrate, plants wilting for no apparent reason: fly pupae in crops signal an already well-established reproductive cycle. Acting on the pupae means intervening at the stage where the larva transforms into an adult, just before the population explodes. The problem arises in greenhouses as well as in open-field vegetable growing or in planters on balconies.
The pupal cycle of flies: understanding to act at the right time
Before discussing methods, it’s essential to visualize what happens in the soil. A housefly can lay up to a thousand eggs during its lifetime. Each egg gives rise to a larva, then a pupa, and finally an adult ready to lay eggs in turn.
The duration of this cycle varies between one week and three months depending on the temperature. In summer, development accelerates exponentially. Adult flies represent only 15% of the total population: the rest hides in the form of larvae and pupae in the substrate or waste. Waiting to see swarms of adults means you have already lost a battle.
This is why preventive methods target the soil, moisture, and decomposing organic matter, where pupae form. Several approaches exist, and you will find agricultural advice on Agri Systems detailing some of these strategies.

Drying the surface of the substrate to break the larval cycle
Have you ever noticed that fungus gnats disappear when you forget to water? It’s no coincidence. Fly larvae (especially Sciaridae in protected crops) need a moist environment to develop.
A recent protocol recommends allowing the top two to three centimeters of the substrate to dry between waterings. Combined with trapping adults using sticky yellow panels and a single larval treatment (BTI or nematodes), this protocol lasts about 21 days. This duration corresponds to the time needed to interrupt a complete reproductive cycle in the substrate.
The idea is not to stress the plants due to drought but to make the surface layer inhospitable for eggs and young larvae. In greenhouses or potted crops, this is one of the simplest levers to implement.
Crop rotation and pupae stock in the soil
In open fields, the problem takes on another dimension. The pupae of certain species, like the onion fly, hibernate directly in the soil. If you replant alliums (onion, garlic, shallot, leek) in the same spot every year, you provide a permanent pantry for the adults that emerge in spring.
A minimum rotation of three years significantly reduces the stock of pupae in the soil. In case of heavy infestation, it is recommended to extend this rotation to four years before reintroducing alliums in the same plot. This approach costs nothing, but it requires planning your crop rotations over several seasons.
Trap crops and unfavorable associations for flies
Some plant associations disrupt egg-laying flies. The idea is to confuse the olfactory signals that attract females to their host plants. Carrots and leeks grown side by side are a classic example: each species repels the specific fly of the other.
This is not an absolute barrier, but the association reduces the egg-laying pressure on each crop. Combined with rotation, this practice limits the establishment of pupal reserves in the soil.

Targeted biological control against larvae and pupae
Rather than waiting for the adult to trap or chemically treat, one can tackle the problem at the larval and pupal stages. Two categories of beneficial organisms stand out:
- Micro-wasp parasitoids lay directly in fly pupae. The wasp larvae consume the pupa from the inside, preventing the emergence of the adult. Releasing these beneficials is practiced in both breeding and protected cultivation.
- Entomopathogenic nematodes, applied by watering, penetrate the larvae in the substrate and kill them within a few days. Their effectiveness depends on the temperature and moisture of the soil.
- BTI (Bacillus thuringiensis israelensis), a natural bacterium, specifically targets dipteran larvae without affecting other soil organisms. A single treatment integrated into the 21-day protocol is often sufficient in container cultivation.
These biological solutions leave no residues in harvested products. They fit into a strategy where chemical control is only a last resort.
Management of waste and cleanliness of agricultural buildings
In livestock farming, flies lay massively in decomposing manure and thick slurry. The larvae develop there at high speed.
Draining waste at least once a week helps eliminate a large number of larvae by breaking the cycle before the pupal stage. Maintaining the fluidity of the slurry prevents the formation of crusts where flies preferentially lay eggs. Adding a liquefier promotes the degradation of organic matter by bacteria and limits laying areas.
In buildings, regular cleaning of areas where organic matter accumulates (troughs, corridors, bedding) reduces breeding sites. This is a simple measure, but its impact on the pupae population is considerable when applied systematically.
Insect nets on sensitive crops
For open-field vegetable crops, installing fine mesh nets after sowing or planting provides a physical barrier against egg-laying. Adult flies cannot reach the soil around the protected plants.
This method is particularly suitable for carrots, leeks, and onions. It requires an initial investment, but the nets can be reused for several seasons.

Monitoring and intervention thresholds to avoid unnecessary treatments
Setting a few sticky yellow traps in at-risk areas serves not only to capture adults. It is a monitoring tool. By counting the captures each week, you can spot the beginning of a population rise before it becomes uncontrollable.
- Install a trap every ten to fifteen meters along sensitive rows.
- Check the traps once a week and record the number of captures.
- Trigger biological treatments (nematodes, BTI, release of parasitoid wasps) as soon as the capture threshold significantly increases over two consecutive counts.
An integrated control program relies on regular observation, not on a fixed schedule. Treating too early wastes resources. Treating too late allows pupae to form in large numbers.
The most reliable approach combines several of the methods described: long rotation, surface drying, biological auxiliaries, and monitoring through trapping. No single technique is sufficient, but their combination over time makes the environment sustainably unfavorable to fly pupae.



