The fastest home remedy for gnats is a simple trap: a small bowl of apple cider vinegar with a drop of dish soap. The vinegar attracts gnats, and the soap breaks the water’s surface tension so they sink and drown. But traps alone won’t solve the problem if gnats are breeding in your houseplant soil, kitchen drain, or fruit bowl. The best approach combines a trap with a targeted fix for wherever they’re laying eggs.
Before grabbing supplies, it helps to know which type of gnat you’re dealing with, because the breeding source determines which remedy actually works.
Identify Which Gnat You Have
Three tiny flies commonly show up indoors, and people call all of them “gnats.” They look similar but live in different places, which means different solutions.
- Fungus gnats hover around houseplants. They have noticeably long legs and segmented antennae, and the larvae live in moist potting soil. They’re a sign of overwatering.
- Fruit flies cluster near ripe fruit, open drinks, and kitchen counters. They’re tiny (under 1/8 inch), tan or brownish, and drawn to anything fermenting.
- Drain flies look almost fuzzy or moth-like and hang out near sinks, showers, and garbage disposals. Their larvae feed on the slimy organic film inside drain pipes.
If you’re not sure, pay attention to where you see the most activity. Gnats near plants are almost certainly fungus gnats. Gnats near your kitchen sink could be fruit flies or drain flies. The location tells you where to focus your treatment.
The Apple Cider Vinegar Trap
This works on fruit flies especially well, and it catches fungus gnats too. Mix 1/3 cup of apple cider vinegar with 2 tablespoons of water in a small jar or bowl, then add a single drop of liquid dish soap (Dawn or similar). Set the jar wherever gnats are most active.
The fermented smell of the vinegar draws gnats in. Without the soap, they’d land on the surface and fly away. The soap reduces the liquid’s surface tension just enough that gnats break through and drown. One drop is all you need. Too much soap can overpower the vinegar scent and make the trap less attractive.
Place multiple traps if gnats appear in several rooms. Replace the mixture every two to three days, or whenever it gets cloudy with dead gnats. These traps catch adults but won’t stop new ones from hatching, so you’ll want to pair them with one of the source treatments below.
Treating Fungus Gnats in Houseplant Soil
If gnats are coming from your plants, the larvae are feeding on organic matter in wet soil. You need to break their breeding cycle, and that starts with drying things out.
Let the Soil Dry
Allow the top inch of soil to dry completely between waterings. This eliminates the moist surface that female gnats need to lay eggs. You can also switch to bottom watering: set the pot in a tray of water and let the roots absorb moisture from below while the top stays dry. According to the University of Wisconsin’s horticulture program, modifying your watering habits is the single most important step in managing fungus gnats.
Hydrogen Peroxide Soil Drench
To kill larvae already in the soil, mix one part standard 3% hydrogen peroxide with four parts water. Pour the solution over the soil as you would a normal watering. It will fizz on contact, which is the peroxide killing larvae and eggs. This won’t harm your plant’s roots. You can repeat this every few days until you stop seeing new adults.
Sand or Gravel Topping
Covering the soil surface with a half-inch to one-inch layer of coarse sand or fine gravel creates a physical barrier. Adult gnats can’t reach the moist soil to lay eggs, and emerging adults have a harder time getting out. This is a simple, long-lasting fix that works well alongside reduced watering.
Diatomaceous Earth
Food-grade diatomaceous earth (DE) is made from microscopic fossilized particles that damage the bodies of larvae and adult gnats on contact. Spread a thin layer over the soil surface, or mix it into the potting mix when repotting. In practice, DE shows strong results within a week, and populations are nearly gone after about three weeks. Make sure to buy the food-grade version, not the pool-grade product, and wear a mask when applying it to avoid inhaling the fine dust.
How Long Treatment Takes
Fungus gnats go from egg to adult in roughly 17 days at room temperature. Eggs hatch in about 3 days, larvae develop over 10 days, and pupae emerge as adults after another 4 days. This means you’ll need to keep up treatment for at least three to four weeks to catch every stage of the life cycle. If you’re using a biological soil treatment, reapply every five days or so, since these products don’t persist in potting media.
Clearing Drain Flies
Drain flies breed in the gooey organic buildup inside pipes. Killing the adults with a trap won’t help much if the slime layer remains. A baking soda and vinegar flush breaks down that buildup.
For each drain, sprinkle half a cup of baking soda directly into and around the drain opening. Follow it with one cup of white vinegar. It will bubble aggressively, which is the chemical reaction loosening the organic film. Let it sit for about 10 minutes, then flush with very hot water. Use the hottest tap water you can get rather than a rolling boil, which can stress older pipes. Repeat this for every drain in the house, including showers and utility sinks, since drain flies can breed in any pipe with standing moisture.
You may need to do this two or three times over the course of a week to fully clear an established colony.
Essential Oil Repellent Spray
Essential oils won’t eliminate an infestation on their own, but they’re useful for keeping gnats away from specific areas like a patio table or kitchen counter. Peppermint oil is one of the most effective options. It acts as both a repellent and a contact insecticide for small flying insects. Eucalyptus, lavender, and tea tree oil also have documented repellent properties.
To make a spray, combine about 15 drops of lavender oil, 10 drops of eucalyptus oil, and 10 drops of tea tree oil with 2 ounces of distilled water and 2 ounces of white vinegar in a spray bottle. Shake well before each use and mist it into the air around problem areas. This blend is meant to be sprayed into the surrounding space, not directly onto skin, since some citrus-based oils can cause sensitivity in sunlight.
Preventing Gnats From Coming Back
Most gnat problems come down to excess moisture and exposed organic material. A few habits keep them from returning.
For houseplants, stick to a consistent watering schedule that lets the soil surface dry between sessions. Overwatering is the primary cause of fungus gnat infestations, and their presence is often the first sign that your plants are getting too much water. If you tend to overwater, a layer of sand on top of the soil acts as a permanent barrier against egg-laying.
In the kitchen, store ripe fruit in the refrigerator or in sealed containers. Empty compost bins frequently. Wipe down counters where juice, wine, or other sugary liquids might have splashed. Fruit flies can squeeze through standard window screens, so keeping attractants sealed matters more than keeping windows closed.
For drains, run hot water through infrequently used sinks and showers once a week. The organic film that drain flies need builds up fastest in pipes that sit stagnant. A monthly baking soda and vinegar flush in kitchen and bathroom drains is a good preventive routine, especially in warm months when breeding accelerates.