University of Maryland Extension

Fungus Gnats - Indoor Plants

close up of fungus gnat

  • Fungus gnats are tiny, black flies that are commonly seen around lamps and windows.
  • They are annoying, but harmless and do not harm indoor plants.
  • The larvae breed in moist soil, primarily in potted plants containing soil rich in organic matter. Larvae feed on fungi in the moist soil.
  • Overwatering contributes to the growth of the fungi on which the larvae feed.

microscopic fungus gnat larva
Fungus gnat larva


  • Determine if the gnats are coming from a particular plant or drain. To do this, cover the plant or drain with screen or cheesecloth and check the next day for evidence of the flies.
  • Monitor for fungus gnats and other flying indoor plant pests by placing yellow paper sticky traps in the containers.
  • If the fungus gnats are breeding in potting soil, dry it out. When the soil dries, the larvae will die.
  • Change the watering cycle of the indoor plants to prevent the soil from remaining wet.
  • Another option is using Bacillus thuringiensis var. Israelensis (Bti), also called H-14 strain, it is a naturally occurring bacterium found in soils. Bti is the active ingredient in soil drench products labeled for indoor plants to control fungus gnat larvae in the soil. Look in garden centers or do an online search for sources.
  • If they are breeding in a drain, use a commercial drain cleaner and or clean out the trap to eliminate the breeding site. 
Maintained by the IET Department of the College of Agriculture and Natural Resources. © 2020. Web Accessibility

University programs, activities, and facilities are available to all without regard to race, color, sex, gender identity or expression, sexual orientation, marital status, age, national origin, political affiliation, physical or mental disability, religion, protected veteran status, genetic information, personal appearance, or any other legally protected class. If you need a reasonable accommodation to participate in any event or activity, please contact your local University of Maryland Extension Office.