FIND
HOW

How to Get Rid of Gnats in the House

A potted houseplant on a table near a window

Photo: Vika Chartier on Unsplash

Find How may earn a commission when you buy through links on this page.

Most gnats in the house are fungus gnats from overwatered houseplants, and the fix is to let the soil dry out. Let the top inch or two of potting soil dry before you water again, empty water from saucers, catch adults on yellow sticky cards and, if needed, treat the soil with a Bti product that kills the larvae. University of Wisconsin-Madison Extension calls changing the plant’s conditions the single most important step. If the small flies are around fruit or the trash instead, they are probably fruit flies, which need a different approach.

Which gnats do you have?

Where you see them Likely pest What to do
Around houseplants, on windows and lamps Fungus gnats This guide
Around fruit, trash or recycling Fruit flies How to get rid of fruit flies
In the bathroom or near drains Drain flies How to get rid of drain flies

Oregon State University Extension describes fungus gnats as very small flies, about 1/16 to 1/8 inch long, that fly up when plants are watered or moved and are drawn to lamps and windows.

Step 1: Let the soil dry out

Fungus gnat larvae live in the top layer of damp potting soil and feed on fungi and decaying organic matter. Dry soil kills the larvae and gives adults nowhere to lay eggs.

  • Water only when the top inch of soil is dry. UW-Madison Extension recommends letting the top inch dry before watering, and Cornell University’s IPM program suggests keeping the top two inches dry.
  • Empty saucers and cache pots after watering. Oregon State advises not leaving standing water in saucers.
  • Water from the bottom: set the pot in a tray of water so the roots drink while the surface stays dry, then drain the tray.
  • Use pots with drainage holes.

Step 2: Trap the adults with yellow sticky cards

Push yellow sticky cards into the soil or hang them near the plants. Adults are attracted to the yellow and get stuck. Sticky cards also show you which plant is the source and whether numbers are falling. Look for yellow sticky traps at garden centers or online.

Step 3: Treat the soil if the problem continues

If drying the soil is not enough, products containing Bacillus thuringiensis subspecies israelensis (Bti) kill fungus gnat larvae in the soil. UW-Madison Extension lists Bti products available to homeowners, such as Gnatrol and Mosquito Bits. Follow the label directions for houseplant use. Oklahoma State University Extension notes Bti does not affect eggs, pupae or adults, so keep using sticky cards alongside it.

Step 4: Repot badly infested plants

For a plant that stays infested, repot it in fresh, sterile potting mix. Cornell suggests rinsing the old soil off the roots, keeping the roots wet while you work and repotting quickly in clean soil. Throw the old soil away outside.

Do you need insecticide?

Usually not. Iowa State University Extension says it does not recommend insecticides for fungus gnats in houseplants because they are not necessary and not effective. Moisture control, sticky cards and Bti handle most problems.

Do vinegar traps work for gnats?

Apple cider vinegar traps are built for fruit flies. They may catch a few fungus gnats, but yellow sticky cards work far better for gnats because adults are drawn to the color. If you have both pests, use both traps. See our fruit fly trap guide.

Why gnats show up in winter

Fungus gnats are often worse in winter, when houseplants grow slowly and use less water but are watered on the same schedule as summer. NC State Extension notes fungus gnats are more of a problem in winter and usually result from overwatering. Water less often in the cold months and check the soil before each watering.