How to Get Rid of Gnats (Fruit Flies, Fungus Gnats, Drain Flies)
The fastest way to get rid of gnats is to identify which kind you have and remove their breeding source: for fruit flies, toss overripe produce and set an apple-cider-vinegar-and-dish-soap trap; for fungus gnats, let houseplant soil dry between waterings and treat damp soil with diluted hydrogen peroxide; for drain flies, scrub drain slime and flush with boiling water on a schedule. Traps catch adults, but eliminating food and breeding sites is what ends the infestation.

What “gnats” usually means indoors
“Gnat” is a catch-all for several small flies. The three most common in homes are fungus gnats, fruit flies, and drain flies. Each needs a different fix.
Fungus gnats
Dark, long-legged, weak fliers that walk on soil more than they dart. They breed in damp potting mix and fungus. Harmless to people, but larvae can bother seedlings. Control: water less often (let the top inch or two dry), top-dress with sand or fine gravel, and remove chronically soggy pots.

Fruit flies
Tan or brown, round-bodied, often red-eyed, fast fliers. Attracted to fermenting produce and vinegar smells — not firm unripe fruit. Control: refrigerate ripe produce, empty compost and trash often, rinse recycling, wipe sticky spills.

Drain flies (moth flies)
Fuzzy, moth-like, short bodies; breed in the organic biofilm inside drains. Mostly evening fliers. Control: scrub the drain film with a brush, then flush; enzyme drain cleaners help on organic slime. Boiling water several times a week for a few weeks helps break the cycle after mechanical cleaning.
Whole-house strategy
- Identify the type by where you see them (plants vs fruit bowl vs bathroom drain).
- Remove the breeding source first.
- Set traps for remaining adults.
- Keep up prevention for 2–3 weeks so the next generation cannot restart.
Outside entry points
Repair window screens, reduce standing water in saucers and gutters, and move ripe fruit indoors into the fridge. Outdoor populations spike in warm months; seals and screens cut the indoor spillover.
Gnats on houseplants
- Let soil dry appropriately for the plant species
- Empty water from decorative cachepots
- Replace moldy topsoil if needed
- Drench soil with a dilute 3% hydrogen peroxide solution (about 1:4 peroxide to water is a common home mix — spot-test plants) to kill larvae, then resume normal watering sparingly
- Yellow sticky traps catch adults near pots

Kitchen fruit-fly control
- Daily produce check — toss or refrigerate soft items
- Rinse juice bottles and wine glasses before the sink sits
- Take out trash and compost nightly during an outbreak
- Wipe under appliances where spills hide
- Run the disposal with hot water and a citrus peel after use
DIY traps (dish soap is the key)
Apple cider vinegar trap: pour ACV into a jar, add a drop of dish soap (breaks surface tension so flies sink), cover with plastic wrap and poke holes — or leave open in a quiet corner.
Wine or white vinegar: same soap trick if you are out of ACV.
Overripe fruit / mashed banana: in a jar with a funnel or wrap lid; discard the whole trap when done.

Sugar or honey water: sweet mix plus dish soap in a shallow dish. Soap is what makes every liquid trap work — without it, many flies drink and leave.
Step-by-step 7-day reset
- Day 1: identify type; deep-clean the source (soil, produce, or drains).
- Days 1–7: refresh traps daily; sticky cards near plants if fungus gnats.
- Days 1–21 for drains: brush + hot flush several times a week.
- After adults disappear, keep produce and watering habits honest for another week.
Frequently asked questions
Do ultrasonic plug-ins work?
Evidence is weak. Source removal and traps outperform gadgets for home infestations.
Are gnats dangerous?
Common indoor fungus gnats, fruit flies, and drain flies are nuisance pests, not typical disease vectors like mosquitoes. Still worth clearing for hygiene and sanity.
When should I call pest control?
If you have ruled out plants, produce, and drains and still see large numbers, or if you suspect sewer-gas related drain issues needing a plumber.
A spotless kitchen and clean drains make fruit and drain flies far less likely. Book Pro Housekeepers’ regular cleaning or a one-time deep cleaning to reset the space while you run traps.