How to Get Rid of Gnats in the House for Good
Cover photo by Katja Schulz via Wikimedia Commons, CC BY 2.0, resized.
If this fix touches water, gas, or power, the guide starts with the shutoff step and says when a licensed pro should take over.
Product links in this guide are affiliate links. If you buy through one, we may earn a small commission at no extra cost to you. It never changes which products we recommend.
A few tiny black flies drift up every time you water the fern, and now one is doing laps around your laptop screen. If they’re slow, slender, and live near the plants, they’re fungus gnats, and they’re breeding in the soil. The adults are harmless. The larvae are chewing roots, and every week you wait adds a generation.
Quick Answer
Here’s how to get rid of gnats in the house when they’re coming from houseplants: stop watering until the top two inches of soil are dry (a finger test, every pot, every few days), push yellow sticky traps into the soil to catch the adult fungus gnats, and water every pot once a week with a BTI drench (mosquito bits soaked in water) to kill the larvae. Keep that up for three weeks, one full life cycle, and the gnats stop. Empty drip saucers, and top the soil with half an inch of sand if a pot stays stubborn. Total cost $10 to $25. If the flies are tan with red eyes and gather over fruit, that’s a fruit fly problem, and if they’re fuzzy and sit by the sink, it’s drain flies. Each has its own fix.
What You’ll Need
- Yellow sticky traps, $6–$10 for a pack of 20
- Mosquito bits (BTI), $10–$15, enough for a season
- A watering can and a cup for soaking the bits
- Coarse sand or fine gravel, $5, for top-dressing stubborn pots
- Fresh potting mix for the one pot that won’t quit
Step-by-Step
Identify which fly you have
Catch one on a sticky trap or a wet finger and look. Fungus gnats are about 1/8 inch, black or dark gray, with long legs and a single pair of clear wings, and they fly like they’ve had a drink. Fruit flies are rounder, tan, and quick, with visible red eyes. Drain flies are fuzzy, wider than they are long, and rest on walls. Gnats rise from pots when you disturb the soil. That one test decides the whole plan, because sticky traps and BTI do nothing for the other two.
Let the soil dry out, and keep it that way
Fungus gnats lay eggs in the top inch of damp soil, and the larvae need it to stay damp. Stop watering every pot until the top two inches are dry to the touch. For most houseplants in fall and winter that’s every 10 to 14 days, far less than the twice-a-week habit that caused this. Water from the bottom where you can, by setting the pot in a tray of water for 20 minutes, so the surface stays dry. Dump any water standing in saucers. Within a week you’ll see fewer gnats rising when you move a plant.
Trap the adults
Push a yellow sticky card into each pot, an inch above the soil, or lay one flat on the surface. Adults are drawn to the yellow, land, and stay. The traps won’t end the infestation on their own, since each female has already laid up to 200 eggs, but they take adults out of circulation before they lay more and they tell you which pot is the source. A card that’s black with gnats in two days is sitting in the breeding pot. A clean card means that plant is fine.
A yellow sticky card staked between potted herbs. Adults land and stay, and a card that fills fast marks the breeding pot. Photo by rupp.de via Wikimedia Commons, CC BY-SA 3.0, resized.
Drench the soil with BTI
Bacillus thuringiensis israelensis, sold as mosquito bits or dunks, is a bacterium that kills fly larvae when they eat it and does nothing to plants, pets, or people. Soak four tablespoons of bits in a gallon of water for 30 minutes, strain, and use that water for the next regular watering of every pot, including the ones that look clean. Repeat with each watering for three weeks. Larvae stop feeding within a day of the first drench. A diluted hydrogen peroxide mix (one part 3 percent peroxide to four parts water) works as a one-time alternative, but it kills on contact only and needs repeating.
Starve out the last pot
If one plant keeps producing gnats after three weeks, its soil is holding too much water. Top-dress it with half an inch of coarse sand or fine gravel, which dries fast and blocks adults from reaching the soil to lay. If it’s still going, repot: knock off as much old mix as you can, rinse the roots, and use fresh mix in a pot with real drainage holes. Bagged mix stored open in a damp garage can carry eggs, so keep the bag closed and dry.
Time and Cost
| Fix | Time | Cost |
|---|---|---|
| Dry out the pots and set sticky traps | 20 min | $6–$10 |
| BTI drench, three weeks of waterings | 5 min each | $10–$15 |
| Top-dress or repot one stubborn plant | 20 min | $5–$10 |
| Pest control visit | — | $100–$250 |
Why This Works
A fungus gnat spends most of its life as a larva in the top inch of damp soil, eating fungus and fine roots, and only about a week as the adult you see. Killing adults alone never ends it, because the next generation is already underground. The plan attacks every stage at once: dry soil stops egg-laying and starves the fungus the larvae eat, BTI poisons the larvae that are already there, and sticky traps remove adults before they lay. Three weeks matters because that’s how long an egg takes to become an adult. Any treatment shorter than one life cycle leaves a generation behind to restart the problem.
Mistakes to Avoid
- Spraying the adults and calling it done. A few dead gnats on the windowsill while two hundred larvae mature in the pot. Treat the soil.
- Watering on a schedule instead of by the finger test. Most indoor plants need far less water in the dark months. The schedule that worked in June is the gnat problem in November.
- Setting vinegar traps for gnats. They catch fruit flies. Fungus gnats ignore fermentation and keep breeding in the pots.
- Treating only the plants with visible gnats. Eggs are in the quiet pots too. Drench every pot in the house, or the clean ones reinfest the treated ones in a month.
Bringing plants indoors for the cold is also when ants come in behind them. If you spot a trail along the baseboard near the plant shelf, the ant guide covers finding the entry point.
FAQ
What's the difference between gnats and fruit flies?
Fruit flies are tan with red eyes, fly well, and hang around ripe fruit, the trash, and the recycling. Fungus gnats are black, slender like a tiny mosquito, fly weakly, and rise out of houseplant soil when you water or brush the pot. Drain flies are fuzzy and moth-shaped and sit on the wall near a sink or shower. Each one breeds somewhere different, so the fix depends on which you have.
Why do I suddenly have gnats in my house?
Something got wet and stayed wet. A new houseplant or a fresh bag of potting mix can carry eggs, overwatering through fall and winter keeps the top of the soil damp for days, and a plant moved indoors for the cold brings its soil population with it. A pot can hold hundreds of larvae, and one generation takes about three weeks, so a few gnats become a cloud fast.
Does apple cider vinegar get rid of gnats?
A vinegar trap catches fruit flies well and fungus gnats barely at all, since gnats aren't drawn to fermentation. For gnats, yellow sticky cards catch the adults and a BTI drench kills the larvae in the soil. If vinegar traps fill up fast, you have fruit flies, and the kitchen is where to look.
How long does it take to get rid of fungus gnats?
About three weeks of consistent treatment, which is one full life cycle. Adults live about a week, and the larvae already in the soil take two to three weeks to mature. Letting the soil dry stops new eggs, BTI kills larvae as they feed, and the sticky traps mop up adults as they emerge. If you still see new gnats after four weeks, one pot is being missed.
Related fixes
Pests
Drain Flies Keep Coming Back? Kill the Biofilm
Drain flies breed in the biofilm coating a slow drain, not the water. Scrub the pipe, treat it, and repeat for about a week to actually break the cycle.
Time30 min + a week Cost$5–$20 easy
Pests
How to Get Rid of Fruit Flies Overnight
Fruit flies breed in fermenting sugar, not just ripe fruit. Find the real source, set a vinegar trap tonight, and most kitchens are clear by morning.
Time15 min + overnight Cost$0–$10 easy
Pests
How to Stop Ants in the Kitchen
Kitchen ants follow food, water, and scent trails. Clean the trail, seal the entry point, and use bait so the colony carries it home for good.
Time20–30 min Cost$3–$12 easy