Gnats seem harmless until they’re swarming your kitchen sink, your houseplants, or your face every time you walk past the fruit bowl. Most people spray them, wave them away, or set out a half-hearted vinegar trap and hope for the best, then wonder why the gnats are back within a week. That’s because sprays and traps only kill the adults you can see. The real fix means finding and eliminating the breeding source, since a single gnat can lay over 100 eggs in moist organic matter, and new adults hatch every few days.
This guide is for anyone dealing with a gnat problem at home, whether it’s fruit flies circling your counter, fungus gnats in your houseplant soil, or drain flies near your sink. It works whether you’ve had gnats for two days or two months, and it’s built around one goal: getting rid of them for good, not just today.
Featured Snippet
To get rid of gnats, identify the species (fruit fly, fungus gnat, or drain fly) and eliminate their breeding source: overripe produce, wet soil, or drain buildup. Combine source removal with a vinegar-and-dish-soap trap, then let breeding sites dry out or empty completely to stop new gnats from hatching.
Before You Begin
Difficulty: Easy to moderate, depending on how deeply gnats have colonized your space Time: Traps show results in 24–48 hours; full elimination typically takes 1–2 weeks Cost: Under $10 using household items; $15–$30 if buying commercial traps or products DIY vs. Pro: DIY works for the vast majority of home infestations. Call a professional only if drain flies persist after clearing visible buildup, since that can indicate a cracked pipe or hidden organic buildup deeper in the plumbing. Prerequisites: None. No special tools or experience required.
Choosing the Right Approach

Not all gnats are the same, and treating the wrong type the wrong way is the number one reason people say “I tried everything and nothing worked.” Identify which one you have before choosing a method.
| Gnat Type | Where You’ll See Them | Breeding Source | Best Method |
| Fruit flies | Kitchen, near produce or trash | Rotting fruit, vegetables, sugary residue | Remove source + vinegar trap |
| Fungus gnats | Around houseplants | Damp, overwatered potting soil | Let the soil dry + soil drench, or sand topping |
| Drain flies (moth flies) | Bathroom or kitchen sinks | Organic gunk inside drains | Drain cleaning + gel buildup removal |
If you’re not sure which type you have, look closely: fruit flies are tan/brown with red eyes and hover near food, fungus gnats are darker and fly erratically near soil, and drain flies have a fuzzy, moth-like body and cling to walls near drains rather than flying much.
At a Glance
| Category | Details |
| Difficulty | Easy–Moderate |
| Time to see results | 24–48 hours for trap results; 1–2 weeks for full elimination |
| Cost | $0–$30 |
| Skill level | Beginner |
| Best for | Kitchens, bathrooms, houseplants, and any home with a recurring gnat problem |
Things You’ll Need
| Item | Purpose |
| Apple cider vinegar | Attracts gnats into the trap |
| Dish soap | Breaks the surface tension so gnats sink and drown |
| Small jar or bowl | Trap container |
| Plastic wrap and a rubber band (optional) | Creates a funnel entry for a more effective trap |
| Paper towels or a sealable trash bag | For disposing of rotting produce and cleaning surfaces |
| Baking soda and vinegar, or a drain gel/enzyme cleaner | Clears organic buildup from drains |
| Sand or diatomaceous earth (for plants) | Topsoil to block fungus gnat egg-laying |
Step-by-Step Guide
1. Identify and remove the breeding source
Walk through your kitchen, bathroom, and any potted plants. Toss overripe fruit or vegetables, empty and rinse the trash and recycling bins, and wipe down sticky counters, drip trays, and the inside of the garbage disposal. For plants, check if the soil is constantly damp, as that moisture is what fungus gnats need to breed.
Why it matters: Traps only catch adult gnats. If the breeding source stays in place, new gnats hatch faster than you can trap the old ones, which is why this step comes first, not last.
2. Set up a vinegar trap
Pour about half an inch of apple cider vinegar into a small jar, add a few drops of dish soap, and stir gently. If you want a stronger trap, cover the jar with plastic wrap, poke a few small holes in it, and secure it with a rubber band. Place traps near where you’ve seen the most gnat activity.
Why it matters: Gnats are drawn to the vinegar’s scent but can’t land safely on the surface once dish soap breaks the tension, so they sink and drown instead of flying back out.
3. Let houseplant soil dry out between waterings
If fungus gnats are the issue, hold off watering until the top inch or two of soil is dry. Fungus gnat larvae can’t survive without consistent moisture, so this alone often breaks the breeding cycle within one to two weeks.
Common mistake: Watering “just a little” out of concern for the plant. Most houseplants tolerate a longer dry spell far better than they tolerate root rot, and a brief dry period won’t harm them.
4. Top plant soil with sand or diatomaceous earth
Add a thin layer (about a quarter inch) of sand, small gravel, or food-grade diatomaceous earth to the surface of the soil. This physically blocks adult gnats from reaching moist soil to lay eggs.
5. Clean out drains if you’re seeing drain flies
Pour a mix of baking soda and vinegar down the drain, let it sit for 15–30 minutes, then flush with hot water. For heavier buildup, use a drain-safe enzyme gel cleaner designed to dissolve organic gunk, and repeat over several days if flies persist.
Why it matters: Drain flies breed in the thin film of organic material that lines older or infrequently used drains, not in the water itself, so a quick rinse usually isn’t enough.
6. Maintain source control for at least one to two weeks
Keep produce refrigerated or in sealed containers, empty trash daily, keep sinks clean and dry overnight, and continue letting plant soil dry between waterings. This prevents the population from rebuilding even after visible gnats are gone.
How to Know You Did It Correctly
You’re on the right track if trap catches drop noticeably within 48 hours and you stop seeing new adult gnats appear day to day. Full success looks like zero new gnats for at least 5–7 consecutive days, since that covers a full gnat life cycle and confirms no eggs are still hatching.
Expected Timeline and Results
Most fruit fly problems resolve within 3–7 days once the food source is removed and trapping begins. Fungus gnats tied to overwatering typically clear up in 1–2 weeks as the soil dries and the larvae die off. Drain flies can take slightly longer, up to two weeks, because organic buildup inside pipes takes repeated treatment to fully clear.
Alternative Methods
- Red wine instead of vinegar: Works similarly to attract fruit flies, though it’s less consistently effective than apple cider vinegar.
- Sticky traps: Yellow sticky cards work well for fungus gnats specifically, since the color attracts them and the adhesive catches them before they can lay more eggs.
- Hydrogen peroxide soil drench: A diluted mix (1 part 3% hydrogen peroxide to 4 parts water) poured into plant soil kills fungus gnat larvae on contact and fizzes harmlessly in the soil; it doesn’t harm most established houseplants.
- Bug zappers or UV traps: Useful for general flying insect reduction but far less targeted than source removal and vinegar trapping for gnats specifically.
Common Mistakes to Avoid
- Treating only the adults with sprays while ignoring the breeding source, which just delays the problem
- Overwatering houseplants “to be safe” while trying to get rid of fungus gnats
- Using traps without covering the jar, which lets gnats escape as easily as they entered
- Assuming all small flying bugs are the same species and using the wrong method
- Stopping treatment as soon as visible gnats disappear, before the breeding cycle is fully broken
Troubleshooting & Common Problems
| Problem | Cause | Solution |
| Trap isn’t catching anything | Not enough dish soap, or the trap is placed too far from the source | Add more dish soap and move the trap directly next to the breeding area |
| Gnats keep coming back after a few days | The breeding source wasn’t fully removed | Recheck trash, drains, and any overlooked produce; repeat drain cleaning |
| Fungus gnats persist despite drying soil | Soil is still damp deeper down, or drainage is poor | Check that the pot has drainage holes; let the soil dry further before the next watering |
| Drain flies return after cleaning | Buildup wasn’t fully cleared, or there’s a deeper plumbing issue | Repeat enzyme treatment several days in a row; if it persists, consider a plumber |
| Gnats appear in a room with no food or plants | They may be migrating from a shared drain or a neighboring unit | Check nearby drains and shared walls; seal gaps around pipes |
Expert Tips
- Check produce bowls and behind them daily during an active infestation; a single forgotten piece of fruit can restart the whole cycle.
- For fungus gnats, water houseplants from the bottom (via a saucer) instead of the top for a week or two; it keeps the surface soil dry while still hydrating roots.
- Replace vinegar traps every 2–3 days, since a full jar of drowned gnats becomes less attractive and less effective over time.
- If multiple rooms are affected, place a trap in each one rather than relying on a single trap for the whole home.
When to Call a Professional
Call a pest control professional or plumber if drain flies persist for more than two to three weeks despite repeated drain cleaning, if you notice a musty smell suggesting a hidden leak, or if the infestation spans multiple rooms and keeps returning despite consistent source control. These patterns can point to a plumbing issue or a breeding site you can’t reach on your own.
What to Do Next
Once your gnat problem is resolved, build a few habits into your routine to keep it that way: empty kitchen trash daily, store produce in the fridge once it’s ripe, let houseplant soil dry between waterings, and run a baking soda and vinegar rinse through drains once a month as light maintenance.
FAQs
Do gnats bite?
Most common household gnats, fruit flies, fungus gnats, and drain flies don’t bite. If you’re experiencing bites, you may be dealing with biting midges or another insect entirely.
Why do gnats suddenly appear in my house?
They’re typically drawn in by a new food source, such as ripening fruit, or a change in conditions, like overwatered soil or a drain that hasn’t been cleaned recently. Small numbers can also enter through open windows or doors.
Will gnats go away on their own?
Only if their breeding source runs out naturally, which can take much longer than active removal. Without intervention, an infestation typically continues as long as food or moisture is available.
Are gnats a sign of a dirty house?
Not necessarily, they’re a sign of an available breeding source, which can happen even in a clean home if a single piece of fruit is left out too long or a plant is overwatered.
Can I get rid of gnats without vinegar?
Yes. Sticky traps, hydrogen peroxide soil drenches, and thorough source removal alone can all work, though vinegar traps remain one of the fastest and cheapest options.
How long does it take to fully get rid of gnats?
Most infestations clear within 3–14 days, depending on the type of gnat and how consistently the breeding source is removed.
Final Thoughts
Gnats are persistent because they breed fast, not because they’re hard to kill. The traps matter, but the real fix is finding and removing whatever is feeding them rotting produce, damp soil, or drain buildup and staying consistent for a week or two so the full breeding cycle gets broken. Do that, and gnats stop being a recurring problem instead of a one-time nuisance.
