Managing Fungus Gnats and Shore Flies in Commercial Greenhouse Vegetable Transplant Production 

By Leanne Pundt

Publication #EXT060 | March 2024

This publication is intended for commercial greenhouse growers.

Both fungus gnats (Bradysia spp.) and shore flies (Scatella stagnalis) occur in the moist environments common in greenhouses. 

Adult fungus gnats are small (1/8-inch-long), mosquito-like insects, with long legs and antennae. Their two delicate, clear wings have a Y-shaped vein in the wing pattern. Fungus gnat adults are weak flyers and tend to fly in a zig-zag pattern. They are often seen moving across the lowermost leaves close to the soil media surface. Adult females are attracted to fungi so they may also be seen near plants with Botrytis sporulation. Females lay their eggs near these areas, so the developing, black headed larvae have access to a fungal food source. 

Shore fly adults (are about 1/8 of an inch long), and resemble a small housefly with stockier bodies, and shorter legs and antennae than adult fungus gnats. Shore flies also have smoky gray wings with five distinct white spots, whereas adult fungus gnats have clear wings. Shore fly larvae are white, wedge-shaped and do not have a distinctive head capsule. Shore fly larvae are often found near algae, a primary food source.

Shore flies are best managed by preventing algae growth. Thoroughly clean and sanitize greenhouse benches, floors, and plug trays before new production begins. Avoid overwatering and plant slower growing leeks and onions in smaller plug trays (i.e. 288 celled plug trays) to help the seedlings dry out. Use a well-drained growing media. The beneficial insect-killing nematode, Steinernema carpocapsae (Millenium) also helps suppress shore flies.

Fungus Gnat Damage

Fungus gnat larvae are small, (approximately ¼ of an inch long when mature), translucent to white with a distinctive black head capsule. Fungus gnat larvae feed on fungi and decaying organic matter, but also feed upon tender young plant roots. They are most damaging to young seedlings grown in plugs. In laboratory studies, adult fungus gnats carried spores of Botrytis, Verticillium, Fusarium and Thielaviopsis as they moved from plant to plant. Spores have also been found in their droppings. It is unclear how important this disease transmission is in commercial greenhouses.

Biology and Life Cycle

Fungus gnats develop from egg to adult in 21 to 28 days (depending on temperature). Eggs are laid in cracks and crevices in the growing media and hatch in about four to six days. Fungus gnat larvae feed for about two weeks at 72o F and then pupate in the growing media. After four to five days, fungus gnat adults emerge. Overlapping and continuous generations make control difficult.


Yellow sticky cards are best placed horizontally at the soil surface to detect fungus gnat adults. Check and change the cards weekly. Growers develop their own action threshold levels based upon their tolerance levels.

Cultural Controls for Fungus Gnats

Dry, level, well-drained greenhouse floors help eliminate area where fungus gnats breed.

  • Eliminate areas with excess moisture and puddles beneath greenhouse benches;
  • Clean up any spilled media on the floor;
  • Inspect incoming plugs for fungus gnat larvae or their feeding damage; 
  • Avoid overwatering and keep plants as dry as possible during production;
  • Remove plant debris and low growing weeds from inside and outside the greenhouse;
  • Keep cull piles away from the greenhouse;
  • Store the growing media so that it stays dry without tears or openings where native fungus gnats may enter the media bags;
  • Avoid using potting mixes with immature composts less than one year old.

No potting mix is immune to fungus gnat infestations. Adults are attracted to microbially active media (composts, vermicompost, blood meal, kelp). Two to five times as many adults may emerge from microbially active media.

Management of Fungus Gnats

Insect growth regulators and biopesticides can be applied to the growing media to manage fungus gnat larvae.  Repeated applications are needed, as most products do not affect the eggs or pupae. Due to resistance issues, there are few products that work effectively against fungus gnat adults.

The biopesticide, Bacillus thuringiensis var. israelensis, (Gnatrol WDG), is most effective against first instar fungus gnats. This bacteria must be ingested by the larvae, after which a toxic protein crystal is released into the insect's gut. Larvae stop feeding and die. Gnatrol is only toxic to larvae for two days. Repeat applications, i.e. two or three applications at high rates, may be needed to provide effective control.

Insect growth regulators containing azadirchtin (i.e. Aza-Direct, AzaGuard, Azatin O, Molt X) may be applied to the growing media to manage fungus gnat larvae.  Repeat applications may be needed. 

Biological Controls for Fungus Gnats

Commercially available biological control agents (BCAs) include generalist predatory mites, Stratiolaelaps scimitus, entomopathogenic (insect-killing) nematodes, Steinernema feltiae, and rove beetles, Dalotia coriara. All these BCA’s should be used preventively and applied to moist growing media.  They are mutually compatible.

Steinernema feltiae are applied as a drench treatment against fungus gnat larvae during cloudy, overcast weather. Repeated applications every two weeks are needed. Stratiolaelaps scimitus feed on fungus gnat larvae, thrips pupae and shore fly larvae. These predatory mites are best used when fungus gnat populations are low.

The rove beetle, Dalotia coriaria, is a generalist predator that feeds upon fungus gnat and shore fly larvae in the growing media. The slender, dark brown or black adults are nocturnal, so are best released in the evening. Both adults and larvae tend to hide in cracks and crevices of the growing media. 

 Stockier shore flies and delicate fungus gnats on a yellow sticky card
Figure 1: Stockier shore flies and delicate fungus gnats on a yellow sticky card. Photo by L. Pundt


Adult shore flies resting on a pepper leaf.
Figure 2: Adult shore flies resting on a pepper leaf. Photo by L. Pundt


Black headed fungus gnat larvae on a potato disc.
Figure 3: Black headed fungus gnat larvae on a potato disc. Photo by L. Pundt


Lamb, E., B. Eshenaur, N. Mattson and J. P. Sanderson. 2014.   Practical Suggestions for Managing Fungus Gnats in the Greenhouse

New England Vegetable Management Guide – Vegetable Transplants. Updated online December 2023.


Pundt, L. 2024.  Biological Control of Fungus Gnats. UConn Greenhouse IPM Fact Sheet.

Pundt, L. 2023.  Shore Flies in the Greenhouse. UConn Greenhouse IPM Fact sheet