Back to top

Fungus Gnats and Shore Flies

Fungus gnat larvae
Adult Fungus gnat
Fungus gnat larvae


Fungus gnat larvae (Bradysia spp.) are white and legless, about 1/4 inch long when mature, and have a shiny black head. The adult is mosquito-like in body shape, about 1/8 inch long, with long legs, a clear pair of wings, and long antennae. Fungus gnats are weak fliers and are frequently observed resting on the media in the pot or running over the foliage or other surfaces.

The adult fungus gnat is sometimes confused with another small dark-bodied fly called the shore fly, Scatella stagnalis. Shore flies have more robust bodies than fungus gnats and their antennae are very short. Their most distinguishing characteristic is the presence of five light-colored spots on each of their dark wings. Shore flies are also stronger, faster fliers than fungus gnats. In the larval stage shore flies can be distinguished by the opaque, tannish-brown color of the body and the absence of a head capsule.


Fungus gnats and shore flies are attracted to damp locations where fungi are apt to flourish. Fungi are a major part of their diet. Studies have shown that fungus gnats develop more rapidly and have greater survival on fungal diets. In the absence of a fungal food source however, fungus gnats are capable of feeding on healthy plant tissue. Fungus gnats are general feeders and can injure a number of flower crops grown in the greenhouse. Adults are primarily a nuisance however, larvae feed on plant roots, fungi and decaying organic matter and tunnel into the crown and stems of plants. The feeding damage creates wounds that allow soilborne pathogens to enter and can kill plants. Fungus gnat larvae may also carry some soil-borne pathogens such as Pythium, Thielaviopsis and Fusarium. Fungus gnats are a common problem on greenhouse crops gowing in media that contains a high percentage of peat moss or compost. Larvae present in infested plants or soil can lead to prolonged emergence of adults.

Shore flies are not known to feed on healthy plant tissue. Adult and larval stages of shore flies feed primarily on algae or decaying organic matter and breed in moist environments.

Life Cycle of Fungus gnat

The life cycle of fungus gnats is shown in Figure 1. A female fungus gnat may lay up to 300 whitish eggs in clusters of 20 to 30 or more on the surface or in the crevices of moist soil or potting media rich in organic matter. Eggs hatch in about six days. Larvae feed for 12-14 days before changing into a pupa, which is formed inside a silken pupal chamber in the soil. The pupal stage may last 5-6 days and adults live up to 10 days. The life cycle from egg to adult requires approximately 4 weeks depending on temperature; development time decreases as temperatures increase, as is true of most insects.

life cycle of fungus gnat

Figure 1. Life cycle of the fungus gnat

Life Cycle of Shore fly

Eggs are laid singly on the surface of algae. Larvae have eight pairs of short legs and a breathing tube with two dark colored openings called spiracles at the posterior end. Pupation occurs at the edge of the algae mats. Breeding takes place in stagnant and strongly saline water found in greenhouses as a result of excessive irrigation and soil leaching. To reduce shore fly numbers, eliminate algae, avoid over watering, and limit fertilizer run-off.

Management Strategies

  • Fungus gnat and shore fly populations may be partially suppressed by sanitation practices that reduce breeding areas.
  • Wet areas under benches should be eliminated if possible by controlling the use of water or changing the construction of the floor. Accumulations of soil, media, or decayed plants under benches should be avoided.
  • Potting media should be pasteurized before use if possible.
  • Moist potting soil high in organic matter that has been left outdoors for long periods may contain fungus gnat larvae. Fungus gnats and shore flies may also be introduced into the greenhouse in the media of infested plants purchased from other greenhouses.
  • Keep areas below benches free of spilled potting mix, weeds and other debris in which fungus gnats and shore flies might breed.
  • Eliminate standing pools of water on solid benches, on walks, and under benches. This may be accomplished by proper grading and drainage in the greenhouse and by improving watering practices to prevent runoff.
  • Eliminate algae as best you can. Several algicides are currently registered for algae control in the greenhouse. Disinfectants can be used as part of pre-crop clean up program and during the cropping cycle for routine algae management. Green-Shield, Physan 20, Triathlon (Quaternary ammonium compounds) can be applied to floors, walls, benches, tools, pots and flats as disinfectants. ZeroTol (Hydogen Dioxide), is a sanitizer also labeled for use on greenhouse surfaces. Read and follow directions on these products.
  • Thoroughly inspect all incoming plant material and make early treatments.

It should be noted that in 1985, Dr. Dick Lindquist of Ohio State showed that fungus gnat problems are most serious in potting mixes amended with composts lacking in maturity (not completely composted). Microbial activity is excessively high in such mixes, and fungus gnats thrive.

It has also been reported that a pulse in adult emergence follows watering of pots that were previously allowed to dry down. This expected peak in adult fungus gnat populations can be used to time sprays targeting adults or subsequent drenches aimed at larvae.

Prevention and early detection are the keys to controlling this insect, thus reducing the introduction and spread of disease in the greenhouse.

Detection and Monitoring

As with any pest, fungus gnat and shore fly control programs are built on prevention and monitoring. To prevent infestations, establish a weekly scouting/monitoring routine for the duration of the crop.

To monitor for larvae, place raw potato chunks with peel removed on the soil surface. Larvae are attracted to the potato chunks, under which they move and congregate. Check the potato chunks daily for larvae. Potato disks cut one inch in diameter and 1/2 to1 inch thick work well. Ten potato disks may be sufficient to monitor a 10,000 sq.ft greenhouse. Check disks after 48 hours, and count the number of larvae on each disk and any that are present on the growing medium surface. In addition, choose plants on each bench and inspect the soil surface and around the base of the plant including the stem just below the soil line. Record the location and the level of infestation. Badly infested containers of plants should be removed as they serve as a source of infestation.

Adult flies can be monitored with yellow sticky cards placed at the base of the plant at soil line. Weekly inspections of yellow sticky cards can detect the onset of an infestation, and continued recording of the number of adults per card per week can aid in evaluating the efficacy of control efforts.

Space 3" x 5" yellow sticky cards 1-4 per 1,000 sq. ft. throughout the greenhouse. Place yellow cards in a horizontal position just above the soil surface, or lay them on the top of the pots. For early detection, position cards near doorways and vents or among new plants being placed in the house. If time permits, check the cards twice weekly particularly when temperatures warm up in the spring. Research conducted at Cornell University showed that red sticky traps captured more fungus gnat adults than yellow sticky traps. However, yellow sticky traps are commercially available and can be used for a variety of pests in the greenhouse.

Once fungus gnats and/or shore flies begin appearing on sticky cards or larvae are seen under potato chunks, then it is time to make treatment decisions.


Insect growth regulators, microbials and other pest control materials applied to the growing medium may be effective in controlling fungus gnat larvae. Most pest control materials do not affect eggs or pupae so repeat applications may be needed.

The soil-borne bacterium Bacillus thuringiensis israelensis (Gnatrol) may be used before fungus gnat larval populations are high since the bacterium must be ingested in order to be effective. Applications are more effective on the young larvae (1st instar) than mature (3rd and 4th instars).Bacillus thuringiensis israelensis should be applied until fungus gnat populations start to decline. It is not effective against shorefly larvae. Apply a drench or in irrigation system according to label directions. It is reported to be toxic to larvae for only 48 hours, so treatments must be repeated.

Biological Control

Several biological control organisms are available for control of fungus gnats including a predaceous mite (Hypoaspis miles), the parasitic nematode Steinernema feltiae, and the rove beetle Atheta coriaria.

Beneficial nematodes  and predaceous mites used for fungus gnat control do not appear to work as well against shore flies because of the semi-aquatic environment in which they live. Beneficial nematodes (S. carpocapsae) will infect shore fly larvae but may not offer sufficient levels of control in commercial greenhouses.  In unsprayed greenhouses, a tiny parasitoid of shore flies, Hexacola neoscatellae,  occurs naturally in greenhouse and may slow the growth rate of shore fly populations..

Atheta coriaria (Rove beetle) (see info below) may be an option for biological control but will not work on Shore fly larvae that are in standing water. Atheta is a generalist predator that feeds on fungus gnat and shore fly larvae.  All stages of Atheta actively search for prey. Because they can fly, adults can travel through a greenhouse, for distribution and faster population development. The adult beetles and the larvae will mainly search for eggs, young larvae and pupae.

Hypoaspis miles (Predatory mite)

This predatory mite prefers to feed on first instar fungus gnat larvae and will also feed on thrips pupae. It may also feed on debris and algae. It is important to make releases early in the growing season before fungus gnat larval populations are abundant. Applications can also be directed to the soil beneath greenhouse benches. Avoid applications into the growing media prior to planting because this decreases survival. Applications need to be initiated after planting and the growing medium should be moist but not saturated. Hypoaspis miles is active when growing medium temperatures are greater than 50F.

Steinernema feltiae

This beneficial nematode attacks fungus gnat larvae. Nematodes are applied as a drench to containers or flats and they can also be applied through drip irrigation systems, however filters must be removed. Apply nematodes two to three days after inserting cuttings, planting plugs, or starting seeds. To assess the viability of shipments prior to application, place a small quantity of the product in a shallow container with a few drops of tepid water. After a few minutes, look for active nematodes which have a slight 'J' curve at the ends of their bodies.

Repeat applications are usually needed. Growing medium temperatures must be 50-80F with optimum temperatures of 60-70F. Irrigate the growing medium before and after applying nematodes. The nematodes require moisture in order to move within the pores of the growing medium. Apply nematodes in the evening or on cloudy days because the nematodes are extremely sensitive to ultravioliet ligth desiccation. In general, beneficial nematodes are compatible with most pest control materials except for carbamate and organophosphate pesticides.

Atheta coriaria (Rove beetle)

The rove beetle is a generalist predator that feeds on fungus gnat and shore fly larvae and reportedly thrips pupae, in the growing medium. Adults are slender, dark brown to black and covered with haris. The adults are 1/8 inch long with very short wing covers. They fly throughout the greenhouse from original release sites. Larvae are cream to brown in color, depending on age. Both stages inhabit cracks and crevices in the growing medium. Once established in a greenhouse , rove beetles may be present year round althoguh populations may fluctuate depending on fungus gnat populations. Because they are generalist feeders, they consume other natural enemies including H. miles. In addition, young rove beetle larvae may be fed upon by soil-dwelling predatory mites. Rove beetles are commercially available as adults from most biological control suppliers. Optimum temperatures are 65-80F and relative humidity of 50-85%. Both adults and larvae are difficult to detect by scouting since they tend to hide in the cracks and crevices of growing medium. Rove beetles are compatible with beneficial nematodes.

Hunter Flies

Yellow sticky cards my trap hunter flies (Coenosia attenuata) adults, which either fly into unsprayed greenhouses during the growing season or are introduced on new plant material. Hunter fly adults resemble the common hous fly adults. In addition to fungus gnat adults hunter fly adults attack and feed on shore fly, whitefly and leafminer adults. Adult hunter flies only attack prey that are flying. The soil-dwelling larvae are also predaceous and feed on fungus gnat larvae and other insects in the growing medium.

Synacra paupera

This parasitoid may also be captured on sticky cards especially in unsprayed greenhouses. Females insert eggs into fungus gnat larvae which hatch and feed on the fungus gnat larvae. Parasitized fungus gnat larvae live until pupation, after which an adult Synacra paupera emerges. Their maximum rate of increase is higher than fungus gnat larvae at 73F.

Pesticide Treatments

If insecticides are used for treatment, soil treatments (pot drenches and sprenches) directed toward the larval stage at the first sign of insect activity are best used to manage fungus gnats. Make sure material is applied to a depth of 1" or more. Materials are most effective when they are retained in the media. Keep this in mind when fertilizers, fungicides and water all need to be applied to plants. For example, if a fungicide and an insecticide is necessary, apply the fungicide first, then water it in with the insecticide. The fungicide will be moved into the root zone where it is needed and the insecticide will stay in the top where it is needed. Some insecticides are labeled for use on greenhouse floors and under benches in addition to treatments to pots. Carefully read and follow all label directions.

Fungus gnats are common pests on plants such as geraniums, poinsettia, begonias and bulbs, especially if soilless mixes high in peat moss or immature compost are used. Insecticides may not affect eggs or pupae, and repeated applications may be necessary.

For a list of pesticides and more information on using biological control to manage fungus gnats see the current issue of the New England Greenhouse Floriculture Recommendation Guide.


Shore fly Biology and Control by John Sanderson, Cornell University

New England Greenhouse Floriculture Pest Management Guide. Section B.

Photos: Fungus gnat larva close-up, Adult fungus gnat and shore fly on sticky card , Hunter fly , Parasitic wasp (Synacra) of fungus gnats

Revised 2012, Reviewed 2015

Tina Smith
Extension Greenhouse Crops and Floriculture Program
University of Massachusetts, Amherst

Links to Further Resources on the Web

  • The University of California's factsheet on Fungus Gnats, Shore Flies, etc includes information on damage; identification and lifecycle; monitoring; cultural, physical and biological controls and insecticides. Tools for Pest and Weed Management, Useful Resources, and an appendix of Microbial Pesticide Manufacturers and Suppliers.
  • University of Connecticut IPM Program. Biological Control of Fungus Gnats.