The most reliable way to trap gnats indoors combines a simple vinegar-and-soap attractant trap placed at the infestation source with a yellow sticky trap near houseplants, plus eliminating the breeding site itself.
For the full breakdown, see our best Good Gnat Trap guide.
A single gnat trap rarely solves the problem alone — the real fix targets both the adults you see and the larvae you don’t. Most indoor gnat problems trace back to three sources: overwatered houseplants, dirty drains, or forgotten fruit on the counter. Match the trap and the cleanup to the specific source, and the swarm disappears in days rather than weeks.
Which Gnat Type Are You Dealing With?
The trap that works depends on what kind of gnat is buzzing around your kitchen or windowsill. Three types cause nearly all indoor infestations, and they need slightly different approaches.
- Fruit flies (kitchen gnats): Attracted to ripening produce, wine, vinegar, and sugary spills. The classic vinegar trap works best here.
- Fungus gnats (houseplant gnats): Hover around potting soil, especially if it stays damp. Yellow sticky traps and dry soil break their life cycle.
- Drain flies (sewer gnats): Cling near sinks and drains. Draining flushing and cleaning matter more than traps alone.
Identify the hotspot first — where are most of the gnats hanging out? That tells you which trap to use and which breeding site to clean.
Apple cider vinegar and dish soap form the most effective homemade gnat trap for fruit flies and general kitchen gnats. The vinegar draws them in, and the soap breaks the surface tension so they drown instead of landing and flying off. Here’s how to set it up.
- Container: A small bowl or jar with a wide base. A narrow opening helps keep gnats inside, but you can also cover the top with plastic wrap and poke small holes.
- Attractant: Pour about a quarter-inch of apple cider vinegar into the container. Some guides add a pinch of sugar or a splash of stale red wine for extra pull.
- Soap: Add 2-3 drops of dish soap — enough to break the surface tension without creating a strong cleaning smell that might deter them.
- Placement: Put the trap right next to the infestation: kitchen counter near the fruit bowl, beside the sink, next to the trash can, or near a houseplant. Replace the vinegar every 3-4 days.
A fruit-based variation works without vinegar: put a piece of overripe fruit in a jar, cover with plastic wrap, poke holes, and set it out. The same soap-and-sink principle applies.
Sticky Traps for Plant Gnats and Windows
Yellow sticky traps are the go-to solution for fungus gnats around houseplants. The bright color attracts the adults, and the adhesive holds them fast. , or you can coat yellow index cards with honey, syrup, or petroleum jelly as a DIY version.
Place sticky traps near the soil surface of affected plants, and also at windows and sinks where gnats tend to gather. Replace them every 1-2 weeks or when they’re full. For best results, combine sticky traps with drier soil — let the top inch of potting mix dry out between waterings, and switch to bottom-watering so the surface stays less inviting for larvae.
Treat the Source, Not Just the Symptoms
A trap catches adults, but if the breeding site remains, new gnats replace them every few days. The traps work — but only if you also remove what’s attracting them in the first place.
- Clean the kitchen: Wipe up spills, seal opened food, take out the trash regularly, and inspect produce for overripe or rotting pieces.
- Dry out houseplant soil: Fungus gnat larvae need moist soil to survive. Let the top layer dry thoroughly, and consider repotting in fresh, dry soil if the infestation persists.
- Flush drains: For drain flies, pour boiling water down the drain (with care — it can damage some pipes), or use a bleach-and-water solution in a well-ventilated area. This kills the larvae living in the drain film.
FAQs
Why are the gnats still around after I set up traps?
Most likely a breeding site is still active — a forgotten potato in the pantry, damp soil in a plant, or a dirty drain. Traps catch adults, but new ones keep hatching until you find and clean the source. Check the kitchen, plants, and drains systematically.
How long does it take to get rid of gnats with a vinegar trap?
You should see a noticeable reduction within 2-3 days as the trap catches adults, but full control usually takes 1-2 weeks because larvae in the soil or drain film continue hatching. Replace the vinegar every 3-4 days and keep the breeding site clean throughout.
Can I use bleach or boiling water in drains safely?
Yes, but with caution. Bleach requires good ventilation and should be used in small amounts. Boiling water can damage PVC pipes or metal fixtures if poured directly — let it cool slightly before pouring, or run hot tap water for several minutes instead.
