How to Get Rid of Gnats in Your House With White Vinegar

White vinegar works against indoor gnats in two distinct ways: as bait in a drowning trap for fruit flies and as a drain cleaner for drain flies. The approach you need depends on which type of gnat you’re dealing with, and a simple vinegar trap can start catching flies within hours of setting it up. Here’s how to use what’s already in your pantry to tackle the problem.

Identify Which Gnat You Have

The tiny flies people call “gnats” in their house are usually one of three insects, and each one breeds in a different spot. Getting rid of them means targeting the right source.

  • Fruit flies hover around kitchens, garbage cans, and ripe produce. They’re drawn to the smell of fermentation, which is exactly why vinegar traps work so well on them.
  • Fungus gnats live in the moist soil of houseplants. You’ll notice them flying up when you water a plant or disturb the pot. Their larvae feed on organic matter and plant roots in the soil.
  • Drain flies breed inside drains you don’t use often, where organic buildup gives their larvae something to eat. They tend to cluster near bathroom sinks, shower drains, or basement floor drains.

Vinegar traps attract fruit flies reliably. Fungus gnats and drain flies are less drawn to fermentation smells, so they need different strategies. The good news is that white vinegar plays a role in handling all three.

The Vinegar Trap for Fruit Flies

Fruit flies are attracted to the smell of fermentation, and vinegar mimics that scent perfectly. Apple cider vinegar is the strongest lure, but white vinegar works too, especially when you add a bit of sugar to boost the fermentation smell. The dish soap is the key to making the trap lethal: it breaks the surface tension of the liquid so flies that land on it sink and drown instead of flying away.

What You Need

  • 1/4 cup white vinegar (or apple cider vinegar for stronger attraction)
  • 1 teaspoon sugar
  • A few drops of dish soap
  • 1/4 to 1/2 cup warm water
  • A small bowl or jar
  • Plastic wrap and a rubber band (optional but helpful)

How to Set It Up

Pour the vinegar into a small container, stir in the sugar until it dissolves, then add a few drops of dish soap. Gradually mix in warm water. You want the mixture liquid enough to release its scent into the air but not so diluted that the smell is weak. Start with 1/4 cup of water and add more if needed.

For a more effective trap, stretch plastic wrap over the top of the container and secure it with a rubber band. Poke several small holes in the wrap with a toothpick or fork. Gnats crawl in through the holes and can’t find their way back out, so even the ones that avoid the liquid get stuck. That said, the trap catches flies without the plastic wrap too, just not quite as many.

Place traps wherever you see the most activity: near the fruit bowl, by the kitchen sink, next to the garbage can. Check them every day or two and replace the mixture when it gets full of dead flies or loses its smell. You can make as many traps as you need by doubling or tripling the recipe.

How to Clear Drain Flies With Vinegar

Drain flies breed in the slimy organic buildup inside pipes, so a vinegar trap sitting on the counter won’t do much. Instead, you’ll use white vinegar directly in the drain to clean out the residue they need to reproduce.

Pour half a cup of baking soda into the drain, getting as much of it down into the opening as you can. Follow it with half a cup of white vinegar. The mixture will fizz and bubble, which helps break apart the organic film lining the pipe. Let it sit for 10 to 15 minutes, then flush with very hot water. Repeat this for every drain in your house, including showers and any drains you rarely use.

For stubborn infestations, do this treatment every other night for about a week. Drains you don’t use regularly are the biggest culprits, so cover those with a rubber mat or drain plug between uses to prevent flies from entering or exiting.

Dealing With Fungus Gnats in Houseplants

Fungus gnats are the trickiest to eliminate with vinegar alone. A vinegar trap near your plants may catch a few adults, but it won’t solve the problem because the real infestation is in the soil. The larvae live in the top layer of potting mix, feeding on fungi and organic matter, and they’ll keep hatching regardless of how many adults you trap.

The most effective first step is to let your plant soil dry out completely between waterings. Fungus gnat larvae need moisture to survive, and dry soil kills them. Push your finger an inch or two into the soil before watering. If it’s still damp, wait. This alone can break the cycle for mild infestations.

For heavier infestations, consider repotting the plant entirely. Remove the plant, rinse the roots, and discard the old soil. Fresh, dry potting mix eliminates the eggs and larvae in one step. Some gardeners also place used tea bags on top of the soil, as the tannins can make the surface layer too acidic for gnat eggs to mature, though this takes a week or two to show results.

Place a vinegar trap next to affected plants as a supplement. It catches the adult gnats that are already flying around, reducing the number that can lay new eggs. But without addressing the soil moisture, the population will keep regenerating.

How Long It Takes to Work

Indoor gnats reproduce fast. At typical room temperature (around 75°F), fungus gnats go from egg to adult in about 17 days. Eggs hatch in roughly 3 days, larvae develop over 10 days, and adults emerge after another 4 days in the pupal stage. Fruit flies follow a similar timeline.

This means you need to keep traps and prevention measures in place for at least two to three weeks to catch the full lifecycle. Even after the visible adults disappear, eggs and larvae are still developing. If you pull the traps too early, you’ll see a new wave of gnats within days. Plan on maintaining your traps for a full month to be safe, refreshing the vinegar mixture every couple of days so it stays potent.

Cutting Off the Source

Traps reduce the population, but gnats won’t stop coming back until you eliminate what’s attracting them in the first place. A few changes make a big difference.

Store ripe fruit in the refrigerator, not on the counter. Take out kitchen garbage frequently, especially if it contains food scraps. Clean up spills and residue around recycling bins, since even a thin layer of juice or beer residue is enough to attract fruit flies. Rinse bottles and cans before tossing them.

For houseplants, switch to a bottom-watering method where you let the pot absorb water from a tray underneath. This keeps the top layer of soil drier, which is exactly where fungus gnats lay their eggs. Avoid using compost-heavy potting mixes indoors, as the organic material is a food source for larvae.

Run water through seldom-used drains at least once a week to prevent the stagnant buildup that drain flies love. A monthly baking soda and vinegar flush keeps pipes clear of the bacterial film that supports their eggs.