You can get rid of gnats effectively using several methods that don’t involve apple cider vinegar. The best approach depends on where the gnats are coming from: houseplant soil, kitchen drains, or ripening fruit on your counter. Each source calls for a different fix, and targeting the breeding site matters far more than trapping the adults you see flying around.
Figure Out Which Gnat You’re Dealing With
Not all tiny flying bugs in your home are the same species, and the distinction determines what actually works. Fungus gnats hover around potted plants and live in moist soil. Fruit flies cluster near produce, trash cans, and anything fermenting. Drain flies (smaller, fuzzy-winged) breed in the slimy organic film inside sink and shower drains. If you’re seeing gnats in multiple areas, you may have more than one type, and you’ll need to address each breeding site separately.
A quick way to identify them: hold a flashlight near the area where you see the most activity. Fungus gnats will scatter from the soil surface when you water your plants. Fruit flies will swarm around a piece of banana or an open trash can. Drain flies tend to rest on walls near sinks, especially in bathrooms.
Hydrogen Peroxide Soil Drench for Fungus Gnats
If your gnats are coming from houseplants, the larvae are feeding on fungi and organic matter in the top layer of soil. The adults are mostly a nuisance, but the real population lives below the surface. A hydrogen peroxide drench kills larvae on contact without harming your plants.
Mix one part 3% hydrogen peroxide (the standard drugstore concentration) with four parts water. Pour this mixture directly over the soil as you would normally water the plant. It will fizz on contact, which is the peroxide breaking down organic material and killing larvae. One application helps, but you’ll likely need to repeat it over two to three watering cycles to catch newly hatched larvae.
Timing matters here. At room temperature (around 75°F), fungus gnats complete their entire lifecycle in roughly 17 days. Eggs hatch in about 3 days, larvae develop over 10 days, then pupate for another 4 days before emerging as adults. This means you need to keep treating for at least two to three weeks to break the cycle and prevent a new generation from taking hold.
Other Soil-Level Fixes
Let the top inch or two of soil dry out completely between waterings. Fungus gnat larvae need consistent moisture to survive, and simply reducing how often you water can collapse a population on its own. You can also top-dress your pots with a half-inch layer of coarse sand or decorative pebbles, which creates a dry barrier that prevents adult gnats from reaching the soil to lay eggs.
Sticky yellow traps placed near the soil surface catch adult gnats before they can reproduce. These won’t solve an infestation alone, but combined with a peroxide drench and drier soil, they speed things up considerably.
Trapping Fruit Flies Without Vinegar
Red wine works as bait because fruit flies are attracted to fermenting sugars, not specifically to vinegar. Leave the last bit of wine in a glass or bottle, add a few drops of dish soap, and set it near the problem area. The soap breaks the surface tension so flies that land on the liquid sink instead of walking across it.
That said, wine traps tend to catch fewer flies than you’d hope. In side-by-side testing, a wine bottle left out caught only four or five flies. A more reliable non-vinegar option is overripe fruit. Place a piece of banana or a few berry scraps in a jar, stretch plastic wrap tightly over the opening, and poke several small holes with a toothpick. Flies enter through the holes but struggle to find their way back out. Check and replace the bait every couple of days before it dries out.
The real fix for fruit flies, though, is eliminating what’s feeding them. Refrigerate or cover all ripe produce. Empty kitchen trash cans daily, especially in warm weather. Rinse recycling bins that held juice, beer, or wine containers. Wipe down counters where fruit has sat. Without a food source, adult flies die within a week or two, and no new eggs get laid.
Clearing Drain Flies From Pipes
Drain flies breed in the gelatinous organic film that builds up inside pipes, particularly in kitchen sinks, bathroom drains, and shower stalls that see irregular use. Killing the adults with a flyswatter does nothing if the biofilm remains. You need to physically remove or break down that film.
Start with boiling water. Pour a full kettle slowly down the drain to loosen organic buildup and kill larvae living in it. For a stronger treatment, sprinkle half a cup of baking soda into the drain, followed by half a cup of salt, and leave it overnight. The mixture helps dry out moisture and break down residue where larvae thrive. Flush it with boiling water the next morning.
For drains with heavy buildup, an enzyme-based drain cleaner is more effective than a one-time flush. These products contain bacteria that digest the organic film over several applications, removing the breeding habitat entirely. Use a stiff drain brush to physically scrub the inside of the pipe where you can reach, since the slimy layer clings to pipe walls and resists liquid treatments alone.
Repeat the process every few days for about two weeks. Like fungus gnats, drain flies have a lifecycle that takes roughly two weeks to complete, so consistent treatment over that window ensures you’re catching each generation.
General Prevention That Works Year-Round
Most gnat problems start small and escalate because the breeding site goes unnoticed for a few weeks. A few habits keep populations from establishing in the first place.
- Water houseplants from the bottom. Set pots in a tray of water and let the soil wick moisture upward. The top layer stays dry, which is hostile territory for fungus gnat eggs.
- Run unused drains weekly. Guest bathrooms, utility sinks, and basement floor drains develop biofilm quickly when water sits stagnant. A quick flush prevents drain fly colonies from forming.
- Store produce strategically. Bananas, tomatoes, and stone fruits are the most common fruit fly magnets. Keep them in a closed paper bag or under a mesh food cover during peak summer months.
- Take out compost and trash before bed. Gnats are most active in warm, still air. Overnight is when females lay the most eggs in exposed organic waste.
Gnat infestations feel relentless because you’re seeing new adults emerge daily from eggs laid a week or two earlier. Even after you’ve addressed the source, expect to see stragglers for up to three weeks. If numbers are still climbing after that window, you’ve likely missed a secondary breeding site. Check under-sink areas for slow leaks, inspect forgotten produce in pantry corners, and look at the drip trays beneath potted plants.