Skip to content
Pests & Problems |

Gnats in My House

Fungus gnats, fruit flies, and drain flies all need different fixes. This US guide covers identification and proven removal methods for each gnat type.

Indoor gnat infestations peak in the US from late summer through winter when produce comes indoors and overwatered houseplants trap moisture. University of Florida Extension identifies fungus gnats (Bradysia spp.) as among the top five houseplant pests in the US. Fruit flies (Drosophila melanogaster) cause estimated millions in food waste loss annually in US homes.
Guide typePests & problems
Key tips5 covered
FAQs7 answered

Key takeaways

  • Three species cause most US indoor gnat problems: fungus gnats (soil-dwelling), fruit flies (produce), and drain flies (organic drain buildup)
  • Fungus gnats come from overwatered houseplant soil — letting soil dry out between waterings removes the breeding medium
  • Fruit flies require eliminating ripe or decaying produce and cleaning surfaces where juice accumulates
  • Drain flies require physically cleaning drain pipes with a brush and enzyme cleaner — sprays alone don't reach the organic matter they breed in
  • Yellow sticky traps catch adult fungus gnats and help monitor infestation size without pesticides

Three types of gnats in US homes

Indoor gnats in the US are almost always one of three species: fungus gnats (Bradysia spp.), fruit flies (Drosophila melanogaster), or drain flies (Psychoda spp.). Each has a distinct breeding location, appearance, and fix. Treating the wrong type wastes time and money — identification comes first.

The word “gnat” is used loosely to describe any small fly in the home. True gnats are a specific insect family, but most people apply the term to any tiny hovering fly regardless of species. This guide covers the three most common culprits in US households and how to address each one.

How to identify your gnat

The location where you see the gnats is the fastest identification shortcut.

Gnat typeWhere you see themBody colorBody lengthBreeding site
Fungus gnatAround houseplant soil and windowsDark gray to black1/8 inchWet potting soil
Fruit flyAround fruit, compost, countersTan to orange-brown1/8 inchRipe/decaying produce, sticky residue
Drain flyNear sinks, showers, bathroomsGray with fuzzy, moth-like wings1/8 inchOrganic buildup in drain pipes

Fungus gnats

Fungus gnats have a distinctly mosquito-like appearance — long thin legs, long antennae, and a dark body. They fly close to soil and are frequently seen crawling on the soil surface or on window glass near houseplants.

The larvae are white, legless, and approximately 1/4 inch long. They live in the top 2–3 inches of moist potting mix and feed on fungi, decomposing organic matter, and plant roots. Root feeding at high larval densities can damage young seedlings and newly rooted cuttings noticeably; mature plants tolerate moderate infestations with little visible effect.

Adults do not bite and do not damage plants directly. Their short adult lifespan (7–10 days) means a persistent population signals continuous reproduction from live larvae in the soil.

The signature behavior: Fungus gnats are poor fliers. They tend to crawl more than fly, and when they do fly, the movement is weak and wandering. If you wave your hand near your plant and small flies scatter upward from the soil, it’s almost certainly fungus gnats.

Fruit flies

Fruit flies are stockier than fungus gnats, with large red compound eyes visible to the naked eye on close inspection. They hover and fly actively, moving quickly to ripe fruit, spilled juice, wine residue, or any fermenting organic material.

They breed primarily in the surface of overripe or fermenting fruit, in sticky residue under appliances, in recycling bins, and in drains with organic buildup. A single female can lay 400–500 eggs, and the full life cycle from egg to adult runs 8–10 days at room temperature — which explains why a small number of flies can become hundreds within 2 weeks.

The signature behavior: Fruit flies hover at counter and table height, not at floor or soil level. They cluster around produce bowls, compost bins, wine glasses, and drains. When you walk into the kitchen, they scatter from the counter area.

Drain flies

Drain flies look different from both gnats above — they have distinctly fuzzy, moth-like wings that appear almost fluffy. Their wings are held tent-like over the body when at rest, which is distinctive. They move in slow, short hops rather than the active hovering of fruit flies.

They breed exclusively in the organic film (biofilm) that coats the inside of drain pipes — particularly in bathroom sinks and shower drains that see irregular use, allowing organic matter to accumulate undisturbed. The larvae are semi-aquatic and live in this film.

The signature behavior: Drain flies appear clustered near or on bathroom drain surfaces, especially in the morning. They are sluggish compared to fruit flies. Finding them on the bathroom wall near the shower drain is a strong identification clue.

How to eliminate fungus gnats

Fungus gnats are the most common indoor gnat complaint associated with houseplants. They are also the trickiest to eliminate because the larvae live underground, out of reach of most surface treatments.

Step 1: Stop overwatering

This is both the primary cause and the primary fix. Fungus gnats breed only in consistently moist soil. They cannot reproduce in dry soil. Allowing the top 2 inches of soil to dry completely between waterings eliminates the breeding habitat.

For most common houseplants — pothos, snake plant care, and similar — letting the top half of the soil dry before watering is the right practice regardless of gnats. Overwatering is the most common houseplant care mistake in the US, and fungus gnats are the most visible symptom.

Specific watering adjustment: check soil moisture with your finger before watering. If the top 2 inches are still moist, wait.

Step 2: Check for hidden water sources

A gnat infestation that persists despite reduced watering often has a secondary moisture source:

  • Standing water in the saucer under the pot
  • Water trapped beneath a pebble layer or false bottom inside the pot
  • A second plant nearby that is still being overwatered
  • Moist decorative moss on the soil surface

The banana water for plants fertilizer method adds liquid frequently — if you use this, ensure the soil dries adequately between applications. Best soil for indoor plants matters too: heavy soil mixes that retain excessive moisture will perpetuate the problem regardless of watering frequency.

Step 3: Control adult gnats

While soil dries out, the adult population can be reduced with:

Yellow sticky traps: Place at soil level, sticking into the soil. Adults are attracted to yellow and stick on contact. Replace every 1–2 weeks. They will not eliminate the population but reduce adults and make the infestation visible and countable.

BTi (Bacillus thuringiensis israelensis): This is a naturally occurring soil bacterium that kills fungus gnat larvae specifically. It is sold as Mosquito Bits or similar products. Soak the granules in water for 30 minutes, then use that water to water your plants. Safe for people, pets, and plants. Effective in 5–7 days. Repeat every 2 weeks until gnats are gone.

Hydrogen peroxide soil drench: Mix 1 part 3% hydrogen peroxide with 4 parts water. Water plants with this solution once. The peroxide kills larvae on contact in the top inch of soil and then breaks down into water and oxygen — no residue. Repeat weekly for 3–4 weeks.

What doesn’t work: Letting soil completely dry to the point of wilting the plant. Fungus gnats persist even after 3–4 days without water; you need soil moisture to stay low consistently, not occasional extreme drying. Spraying adults with insecticide is temporarily satisfying but doesn’t address larvae.

Full elimination timeline

Fungus gnats have a 3–4 week life cycle. Even if you eliminate every larva today, eggs already in the soil can hatch over 3–4 weeks. Expect a persistent but declining population for 3–4 weeks from the day you fix the moisture issue. A population that is still growing after 3 weeks suggests an untreated moisture source.

How to eliminate fruit flies

Fruit flies require removing their food sources and trapping adults. Unlike fungus gnats, the source is surface-accessible.

Remove breeding sources

  • Overripe or damaged produce: Any piece of fruit with a soft spot is a fruit fly breeding site. Remove immediately, even if most of the fruit is still good.
  • Drains: Fruit flies commonly breed in drain buildup — see the drain fly section below for cleaning method; it applies to fruit fly drain breeding too.
  • Recycling bins: Rinse all bottles and cans before recycling. The sticky residue inside a soda can is a substantial food source.
  • Under appliances: The area under and around refrigerators, stoves, and dishwashers collects sticky spills that are rarely cleaned. Wipe these down thoroughly.
  • Compost bins: Indoor compost bins breed fruit flies if left uncovered. Use a sealed lid and empty frequently.

Trap adults

Apple cider vinegar trap: Fill a small cup 1/3 full with apple cider vinegar. Add one drop of dish soap. Cover with plastic wrap and poke several small holes. Fruit flies are attracted to the fermentation scent, enter through the holes, and sink when the dish soap breaks the surface tension. Replace every 3–4 days.

Homemade alternatives: See the dedicated homemade gnat trap guide for additional trap designs.

With the source eliminated, adult fruit fly populations drop rapidly. Most homes clear within 7–14 days with consistent source removal.

How to eliminate drain flies

Drain flies require physical removal of the organic film where they breed. Sprays and traps do not reach the film inside the pipe.

Cleaning method

  1. Pour boiling water down the drain (for metal pipes only — skip this step for PVC, which can warp)
  2. Use a flexible drain brush to physically scrub the inside of the drain pipe — reaching 6–12 inches below the drain opening
  3. Apply an enzyme-based drain cleaner (not a caustic drain opener). Enzyme cleaners break down the organic film biologically. Gel formulations work better than liquids because they adhere to the pipe walls during the treatment period.
  4. Repeat the enzyme treatment every 5 days for 3 weeks

The drain brush step is the most important and most often skipped. Enzyme products work, but they need direct contact with the biofilm surface. A drain clogged with hair and soap residue has most of its surface area inaccessible to liquid treatments.

Identification check

To confirm drain flies are breeding in a specific drain, place a piece of tape over the drain opening before bed (leave one edge untaped so vapors can escape). Check in the morning. Drain flies that emerged overnight will be stuck to the underside of the tape.

Preventing gnats from returning

Once cleared, prevention requires keeping conditions unfavorable for breeding:

  • Soil: Water houseplants only when needed. How to get rid of gnats in plants has additional detail on soil-based prevention.
  • Produce: Store ripe tomatoes, peaches, bananas, and soft fruit in the refrigerator during peak summer months.
  • Drains: Monthly enzyme drain treatment maintains clean pipes and prevents biofilm buildup before it starts.
  • Compost: If you compost indoors, keep the bin sealed and empty it every 2–3 days in summer.

New houseplants are a common gnat introduction route — they may arrive with fungus gnats already in the soil. Quarantine new plants for 2 weeks before moving them near other plants.

gnats fungus gnats fruit flies drain flies indoor pests houseplants
SM

Sarah Mitchell

Sarah Mitchell is a Master Gardener and garden writer based in the Pacific Northwest. She has been growing food and flowers for over 15 years across USDA zones 7 and 8.