How to Eradicate Gnats: Effective Source Removal and Traps
Eradicating gnats means combining source control with targeted trapping: identify and remove the moisture or organic matter that’s attracting them (overwatered plants, ripe or overripe fruit and vegetables left on the counter, trash, or drain buildup), then use traps like apple cider vinegar dishes or sticky traps to catch existing adults. Most infestations improve within one to two weeks once the breeding source is eliminated.
⚡ The TidyFormula™ Quick Decision
Best approach: Find and remove the moist organic material gnats are breeding in (soil, drains, produce, trash), then set out vinegar or sticky traps to catch remaining adults while you address the source.
Use caution with: Houseplant soil that’s frequently watered, slow or rarely-used drains, and fruit bowls left at room temperature—these are common breeding spots that get overlooked if you focus only on visible flying insects.
Stop and reassess if: Gnats persist for several weeks despite trapping and source removal, you notice them concentrated near a specific wall or fixture (which may point to a hidden moisture issue), or the population seems to be growing rather than shrinking.

Why Gnats Show Up in the First Place
Gnats are drawn to moisture and decaying organic matter. In most homes, that means one or more of these spots:
What I Use For This Job
Using the right tools saves time and protects your belongings. Here are my exact recommendations:
*As an Amazon Associate, TidyFormula earns from qualifying purchases.
- Overly moist potting soil in houseplants
- Kitchen drains, garbage disposals, or drain pipes with buildup
- Ripe or overripe fruit and vegetables left on the counter
- Trash cans, recycling bins, or compost containers
- Damp areas near sinks, water leaks, or condensation
Different types of gnats (fungus gnats, fruit flies, and drain flies are often lumped together as “gnats”) have slightly different breeding preferences, so identifying which one you’re dealing with can help you target the right source. Fungus gnats favor damp soil, fruit flies favor fermenting produce, and drain flies favor organic gunk in pipes.
Step 1: Identify the Breeding Source
Before setting out traps, spend a few minutes tracking where the gnats are concentrated. This is the step most people skip, and it’s often why gnats keep coming back even after repeated trapping.
- Check houseplant soil—if it’s consistently damp or soggy, that’s a likely source.
- Inspect the kitchen sink and any floor drains for slow drainage or a musty smell.
- Look through the fruit bowl and pantry for anything overripe or starting to break down.
- Check trash and recycling bins, especially if they haven’t been emptied or rinsed recently.
- Look for damp spots under sinks or near appliances that might indicate a small leak. If you find persistent dampness or visible growth, see this guide on how to clean mold under the kitchen sink.
Step 2: Remove or Reduce the Source
Once you’ve identified where gnats are breeding, address it directly:
- Houseplants: Let the soil dry out between waterings. Consider top-dressing with a thin layer of sand, which makes the surface less inviting for egg-laying. If soil is dense and rarely dries fully, repotting with fresh soil may help.
- Drains: Clean visible buildup from drain covers and the upper portion of the pipe. For simple, chemical-free ways to clear hair and organic buildup, see how to clean hair from a shower drain without chemicals. If you use a drain cleaning product, follow the label instructions and never mix cleaning chemicals together.
- Produce: Store ripe fruit in the refrigerator when possible, and don’t let anything sit out longer than necessary — a fridge organization and cleaning checklist can help you keep perishable items visible and rotated.
- Trash and recycling: Empty bins regularly and rinse containers that held food or liquids before recycling them; for tips on keeping the can from smelling and attracting insects, read how to deodorize a kitchen trash can.

Step 3: Set Out Traps for Existing Gnats
Removing the source stops new gnats from developing, but adults already flying around need to be caught separately. A few simple traps that many people use:
Apple Cider Vinegar Trap
Pour a small amount of apple cider vinegar into a shallow dish or jar. Add a drop of dish soap, which breaks the surface tension so gnats sink rather than escape. Cover loosely with plastic wrap poked with small holes, or leave uncovered. Place near the affected area.
Sticky Traps
Yellow sticky traps, often sold for houseplants, can be placed in soil or nearby to catch fungus gnats as they emerge.
Wine or Fruit Trap
A small amount of wine, or a piece of overripe fruit, in a jar covered with plastic wrap and a few holes poked in the top works on the same principle as the vinegar trap.
Traps help reduce the visible population, but they work best alongside source removal rather than as a standalone fix.
How Long It Takes
Because gnats have a life cycle that includes egg, larval, and adult stages, you may continue to see occasional adults for a week or two even after removing the breeding source, simply because eggs or larvae already present need time to complete their cycle. Consistent trapping during this period helps prevent a new generation from re-establishing.
When Gnats Keep Coming Back
If you’ve addressed the obvious sources and gnats persist, consider these less common possibilities:
- A hidden moisture problem, such as a slow leak inside a wall or under a floor
- Buildup deeper in a drain than surface cleaning can reach
- Multiple houseplants with the same overwatering habit
- A neighboring unit or shared drain system, in apartments or multi-unit buildings
If gnats continue for several weeks despite reasonable effort, or if you suspect a moisture issue inside walls or flooring, it may be worth consulting a pest control professional or, for suspected leaks, a plumber, since some sources aren’t visible or accessible without specialized tools.
Preventing Gnats From Returning
- Let houseplant soil dry between waterings rather than keeping it consistently moist
- Rinse dishes and clear food debris from the sink before going to bed
- Take out the trash regularly and keep bins clean
- Store ripe produce in the refrigerator during warmer months
- Periodically clean drain covers and the visible portion of pipes
Gnats are generally a nuisance tied to moisture and organic matter rather than a sign of a serious structural problem, but persistent or recurring infestations are worth paying attention to, especially if they seem to concentrate in one specific area of the home.
Everything Mentioned Above
Before you leave, grab the tools you need to get the job done right the first time:
*As an Amazon Associate, TidyFormula earns from qualifying purchases.
