Short answer
Here’s how to get rid of gnats in house for good: figure out which insect you actually have, fix the breeding site it needs to survive, then confirm with sticky traps.
- Look closely at the insect: mosquito-shaped means fungus gnats near your plants, moth-shaped means drain flies near a sink or floor drain.
- Fix the matching breeding site: dry out potting soil for fungus gnats, or scrub the inside of the drain pipe for drain flies.
- Set out yellow sticky traps and recheck them for one to two weeks to confirm the source is actually gone.
How to get rid of gnats in house: the full protocol
Figure out which insect you actually have
Fungus gnats look like tiny mosquitoes: long thin legs, a slim dark body, weak fliers that hover near houseplant soil or a windowsill. Drain flies look like tiny moths instead, with fuzzy gray wings held tent-shaped over the body, resting on tile or the wall near a sink, tub, or floor drain rather than flying much at all. Write down which one matches what you’re seeing before doing anything else, because the two breed in completely different places and the rest of this protocol splits by species from here. If it has red eyes and lands on fruit instead of hovering over soil, it is a fruit fly, and the fruit fly source hunt is the protocol you want instead.
Confirm the exact breeding site
If you suspect drain flies, tape a piece of clear tape sticky-side down over a suspect drain overnight, leaving a small gap so air, and flies, can still get through. Check it in the morning. Flies caught underneath confirm that drain as the source, and it’s worth running the same test on the kitchen sink, bathroom sink, tub, and floor drain if you have more than one candidate, since usually only one is active. For fungus gnats, skip the tape and check pot by pot instead: press a finger into the soil of each houseplant. The pot with consistently damp soil at the surface is almost always the one breeding gnats.
Dry out the soil, for fungus gnats
Let the top inch of soil dry out completely between waterings. Fungus gnat larvae live in that top layer of moist soil and die off once it dries. Switch to bottom-watering, setting the pot in a saucer of water for twenty minutes rather than pouring water on top, and empty any standing water left in saucers within the hour. This single change removes the moisture the larvae need and does more work than anything else on this list.
Add a physical barrier on top of the soil
Once the soil has dried out, top-dress it with a half-inch layer of coarse sand or fine aquarium gravel. This blocks adult gnats from reaching the soil to lay eggs and makes it harder for larvae near the surface to move around and pupate. It’s a one-time fix per pot that keeps working long after you’ve stopped thinking about it.
Scrub the inside of the drain pipe, for drain flies
Drain fly larvae live in the gelatinous film that builds up on the inside of the pipe below the water line, not in the standing water itself. A liquid drain product mostly runs straight through that film without removing it, which is why pouring something down the drain rarely fixes a drain fly problem by itself. Use a narrow bottle brush or a dedicated drain-cleaning brush, push it past the trap, and scrub the pipe walls in a circular motion. Rinse and repeat until the brush comes back clean instead of coated in dark residue.
Set out sticky traps to monitor and knock down adults
Place a yellow sticky trap flat on the soil surface near affected houseplants, or stick one to the wall near the treated drain. Traps won’t fix a breeding site on their own, but they catch adults fast enough to tell you whether the population is actually shrinking instead of just hiding for a day. Check the trap every two to three days and note roughly how many are stuck each time.
Recheck after one to two weeks, and call for help if it doesn’t clear
A real fix shows up as a falling trap count week over week, not just fewer flies in the air on a given afternoon. If sightings and trap catches haven’t dropped noticeably after two to three weeks of consistent drying, scrubbing, and trapping, go back to step one. There’s a good chance a second pot or a second drain is also active and got missed the first time. If you’ve confirmed the breeding site, done the work, and the numbers still aren’t moving, that’s a reasonable point to call a licensed pest control professional rather than keep guessing.
Don’t do this: pour a liquid drain product down the pipe and call the drain flies handled. It runs through the film the larvae actually live in without removing it, so the flies keep hatching a few days later and it looks like the product simply didn’t work.
The shortcut: run the clear tape test before you touch a single drain. Scrubbing the wrong drain for twenty minutes while the real one keeps breeding flies is the most common way people give up on this fix too early.
FAQ
Do fungus gnats or drain flies bite?
No. Neither insect bites people or pets, and neither is a documented disease vector in homes. UC IPM does note that drain flies could pick up pathogens from the film inside a drain, and that fragments of dead adults can become airborne allergens. The reason to remove them is that they’re annoying and a sign of a breeding site worth dealing with anyway.
How long does it actually take to get rid of gnats in house once you start?
Fungus gnats usually taper off within one to two weeks of consistent soil drying, since adults live about a week and new eggs stop hatching once the soil stays dry. Drain flies can clear faster, sometimes within a few days of a thorough scrub, because you’re removing their food source directly instead of waiting out a life cycle.
I already cut back on watering, why are gnats still showing up?
Check every pot, not just the one you think is worst. Fungus gnats will keep breeding in a single overlooked pot, a plant in a guest room, or a saucer that’s still holding water, even if every other pot in the house is dry.
Can I just pour something down the drain instead of scrubbing it?
You can try, but most liquid products run past the organic film the larvae are actually living in rather than removing it. Mechanical scrubbing with a brush is the step that reliably works, because it physically strips the film off the pipe wall.
Sources
- University extension entomology and integrated pest management (IPM) fact sheets