How to Get Rid of Gnats: Fungus Gnats, Drain Gnats, and More
Gnats seem to materialize out of nowhere — circling your face, hovering around your houseplants, swarming near the kitchen sink. They’re frustrating, persistent, and most people treat them wrong because they don’t realize there are different types of gnats with completely different causes and solutions.
This guide breaks down the most common gnat types and gives you the targeted fix for each.
What Type of Gnat Do You Have?
Identifying which gnat you’re dealing with is the most important step. The treatment that works for fungus gnats won’t help with drain gnats, and vice versa.
Fungus Gnats
The most common indoor gnat. Small, dark, mosquito-shaped flies (about 1/8 inch) that hover around and emerge from the soil of potted houseplants. If you see gnats near your plants — especially after watering — you almost certainly have fungus gnats.
Fungus gnat larvae (tiny white maggots) live in the top inch or two of moist potting soil, where they feed on fungal growth and plant root hairs. Overwatered houseplants are the #1 cause.
Drain Gnats (Moth Flies)
Small, dark, fuzzy-looking flies that congregate on walls near bathroom sinks, shower drains, and kitchen drains. They breed in the organic slime buildup inside drain pipes — not in soil or food. Also called moth flies or sewer gnats.
Fruit Flies
Red-eyed, tan-colored flies that hover near fruit, trash, vinegar, and fermented liquids. Often confused with gnats, but fruit flies are a distinct species (Drosophila melanogaster). If your gnat problem is centered around the kitchen and fruit bowl rather than plants or drains, you likely have fruit flies — see our dedicated fruit fly guide for those.
Eye Gnats (Outdoor Gnats)
Tiny gnats that swarm around your face, eyes, and nose outdoors. They’re attracted to body secretions and are primarily an outdoor nuisance. They don’t infest homes.
How to Get Rid of Fungus Gnats
Fungus gnats require a two-pronged approach: kill the larvae in the soil (where the population actually lives) and trap the adults flying around.
Step 1: Let the Soil Dry Out
The single most effective thing you can do is stop overwatering. Fungus gnat larvae cannot survive in dry soil. Let the top 2 inches of soil dry completely between waterings. For most houseplants, this is actually healthy — overwatering is the most common houseplant mistake.
Be patient: Reducing moisture alone will significantly reduce the population over 2–3 weeks as existing larvae die off without being replaced.
Step 2: Set Yellow Sticky Traps
Yellow sticky traps catch adult gnats before they can lay more eggs. Place them:
- Horizontally on the soil surface (catches gnats as they emerge)
- Vertically near the plant at soil level
Recommended: Gideal 20-Pack Dual-Sided Yellow Sticky Traps are inexpensive, effective, and include twist ties for easy positioning. Replace every 2–4 weeks or when full. These also help you monitor population levels — if the traps are still covered after 3 weeks of soil drying and treatment, you know larvae are still hatching.
Step 3: Apply BTi Soil Treatment (Most Effective Larval Kill)
Bacillus thuringiensis israelensis (BTi) is a naturally occurring bacteria that kills fungus gnat larvae in the soil. It’s the active ingredient in Mosquito Bits and Gnatrol, and it’s extremely effective — and completely safe for plants, people, and pets.
How to use Mosquito Bits:
- Soak 4 tablespoons of Mosquito Bits in 1 gallon of water for 30 minutes
- Strain out the granules (or leave them in)
- Use this “BTi water” to water your affected plants
- Repeat every 7–14 days for 4–6 weeks until gnats are gone
Mosquito Bits (available on Amazon) work faster than Mosquito Dunks for this application because you’re brewing a liquid drench rather than using a slow-dissolving puck.
Step 4: Hydrogen Peroxide Soil Drench (Fast-Acting)
A diluted hydrogen peroxide drench kills larvae on contact and oxygenates the soil without harming plants.
Mix: 1 part 3% hydrogen peroxide to 4 parts water. Water your plants with this solution until it drains from the bottom. The solution fizzes as it contacts organic matter and larvae, killing them. Safe to repeat every 7 days.
Important: This kills larvae already in the soil but provides no residual protection. Use it in combination with BTi treatment for complete control.
Step 5: Apply a Neem Oil Soil Drench (Optional)
Cold-pressed neem oil (not neem oil spray — the soil drench) contains azadirachtin, which disrupts the larvae’s ability to molt and reproduce. Mix 2 teaspoons of neem oil + 1 teaspoon of dish soap per gallon of water and water the soil.
Neem has a residual effect and also deters adult gnats from laying eggs in treated soil. Apply every 10–14 days.
What About Top-Dressing the Soil?
Placing a 1-inch layer of coarse sand, perlite, or SandFlea Natural Barrier on top of the soil discourages adult gnats from laying eggs in the surface. It also helps the soil surface dry faster between waterings. This is a useful supplement — not a complete fix on its own, but it reduces reinfestation.
How to Get Rid of Drain Gnats
Drain gnats breed in the organic slime coating the inside of drain pipes. Killing the adults without treating the drain just creates a temporary reduction — new adults will emerge within days.
Step 1: Identify the Infested Drain
Cover all drains in your bathroom and kitchen with plastic wrap or tape overnight. The drain with gnats stuck to the underside of the covering in the morning is the breeding site.
Step 2: Clean the Drain Mechanically
Use a long drain brush or drain snake to physically scrub the inside of the pipe. This removes the organic film that drain gnats breed in. Follow up by pouring a kettle of boiling water down the drain.
Step 3: Apply an Enzyme Drain Cleaner
Bio-enzymatic drain cleaners (like Bio-Clean Drain Septic Bacteria or Green Gobbler Drain Clog Dissolver) digest the organic buildup over time. Pour according to directions, let sit overnight, and repeat weekly for 3–4 weeks.
Avoid bleach: Bleach kills surface bacteria but doesn’t penetrate or remove the organic film deep in the pipe — and drain gnats return within a week.
Step 4: Use a Drain Cover
A fine-mesh drain cover prevents adult gnats from entering the drain to lay eggs and also stops them from emerging. Use between treatments to break the cycle faster.
Recommended Products at a Glance
| Product | What It Does | Best For |
|---|---|---|
| Mosquito Bits | BTi larval kill via soil drench | Fungus gnat larvae |
| Yellow sticky traps | Catches adult fungus gnats | Adult population control |
| Hydrogen peroxide (3%) | Fast larval kill in soil | Quick knockdown |
| Cold-pressed neem oil | Disrupts larval development | Fungus gnat prevention |
| Bio-Clean Enzyme Cleaner | Eliminates organic drain film | Drain gnats |
| Drain brush + boiling water | Mechanical drain cleaning | Drain gnats |
How Long Does It Take to Get Rid of Gnats?
Fungus gnats: With BTi treatment plus sticky traps plus reduced watering, most infestations resolve in 3–6 weeks. The cycle from egg to adult is about 3–4 weeks, so you need to break at least one full reproductive cycle.
- Week 1–2: Adult numbers drop as sticky traps work and adults die off
- Week 3–4: BTi kills larvae; fewer adults emerging
- Week 5–6: If watering is reduced, the population collapses
If adults are still appearing after 6 weeks of consistent treatment, check for other infested plants you may have missed — gnats readily spread between pots.
Drain gnats: With weekly enzyme treatments and mechanical cleaning, drain gnats typically clear within 2–4 weeks.
Prevention: Keeping Gnats Out for Good
For Fungus Gnats
- Water less. This solves 90% of fungus gnat problems before they start. Most houseplants prefer to dry out between waterings.
- Use well-draining soil. Peat-heavy mixes retain moisture; add perlite to improve drainage.
- Inspect new plants. Fungus gnats spread on contaminated potting soil from garden centers. Quarantine new plants for 1–2 weeks before adding them to your collection.
- Use BTi preventively. A BTi soil drench once a month keeps larval populations from establishing.
For Drain Gnats
- Monthly enzyme drain treatments prevent organic buildup from accumulating
- Run hot water down drains after each use
- Clean sink stoppers and drain covers weekly
Bottom Line
Fungus gnats are solved by letting soil dry out, applying a BTi drench (Mosquito Bits), and using yellow sticky traps to catch adults. Hydrogen peroxide provides an immediate knockdown. The full treatment cycle takes 3–6 weeks. Drain gnats require mechanical drain cleaning plus enzyme treatments — bleach alone won’t solve it. Identify which type you have before treating, and match the treatment to the source.
Kevin Larrabee
Pest Control Specialist & Founder of Pest Control Insider