How to Get Rid of Gnats: A Room-by-Room Guide to Getting Rid of These Tiny Flying Pests for Good

by Ani

You walk into your kitchen and there they are — a cloud of gnats flying around your fruit bowl, hovering around your sink, or rising up from your houseplant every time you water it. It’s one of those problems that feels minor right up until it isn’t. A handful of gnats can become a full gnat infestation in less than two weeks.

The good news? You don’t need a pest control professional for most cases. You need to understand what’s drawing them in, cut off their food supply, and set a few simple traps. Here’s exactly how to do that.

What Kind of Gnat Are You Actually Dealing With?

Before you start setting traps, it helps to know what species of gnats you’re up against. Different types of gnats breed in different places, so identifying them first saves you a lot of wasted effort.

Fungus Gnats

Fungus gnats are the tiny black flies you see hovering around house plants. They’re weak fliers and tend to stay close to plant soil. If you see small flies crawling on the surface of your potting mix or rising up when you water your plants, you’ve got fungus gnats. Their larvae live in the soil and feed on organic matter and roots of plants, which can actually damage your plants over time.

Fruit Flies

Fruit flies are small, reddish-brown, and fast. They’re almost always found around fruit bowls, overripe fruit, recycling bins, and anywhere there’s fermenting organic material. They’re often confused with fungus gnats, but fruit flies tend to be lighter in color and are drawn to sugar and fermentation rather than soil moisture.

Drain Flies

Drain flies are tiny, fuzzy, and moth-like. They breed inside the organic buildup inside your pipes. If you see small flies hanging out near your bathroom sink or shower drain — especially in the morning — that’s almost certainly what you’re dealing with. They’re also called phorid flies in some cases, though true phorid flies are a slightly different species.

Signs of a Gnat Infestation Before It Gets Out of Hand

Gnats are small. Easy to dismiss. Most people don’t take them seriously until they’ve got dozens — or hundreds — flying around their home. Here are the signs of a gnat infestation to watch for early:

  • You see gnats flying around in one specific area (near a plant, the sink, or fruit)
  • Tiny flying insects appear every time you water your plants
  • You notice gnat larvae — tiny white worms — on the surface of plant soil
  • Gnats appear near drains even when you haven’t left food out
  • The number of gnats seems to double every few days

If you’re checking multiple boxes here, act fast. These things reproduce quickly.

Where Gnats Live and Why They Keep Coming Back

Here’s the thing most people miss: you can kill a hundred adult gnats and still have the same problem a week later if you don’t deal with where they lay eggs. Gnats thrive anywhere there’s moisture, organic matter, and warmth.

For fungus gnats, that’s almost always your plant soil. Overwatering is the single biggest factor. Wet soil creates exactly the environment fungus gnat larvae need to survive. They don’t actually need your plants — they need the moisture and the decomposing organic matter in the soil.

For fruit flies, rotting fruit, forgotten vegetables, sticky spills inside cabinets, and even the residue inside an empty juice bottle are enough. They lay eggs in bulk — up to 500 at a time — so a piece of overripe fruit sitting out for a few days can seed an infestation fast.

For drain flies, the buildup of hair, grease, and organic sludge inside your pipes is the breeding ground. They flies lay their eggs in that film, which is why cleaning the outside of the drain does nothing.

How to Get Rid of Gnats With Traps (That Actually Work)

Traps alone won’t solve a gnat problem, but they’re effective at reducing the adult gnat population quickly while you address the source.

Apple Cider Vinegar Trap

This is the most well-known homemade gnat trap, and it genuinely works for fruit flies and gnats. Here’s the setup:

  1. Pour two tablespoons of apple cider vinegar into a small glass or jar
  2. Add a few drops of dish soap — this breaks the surface tension of the vinegar so gnats can’t just land and fly away
  3. Cover the top with plastic wrap and poke a few small holes in it, or leave it open
  4. Place it near wherever you see gnats flying around

The vinegar attracts them, the dish soap makes them sink. Replace it every couple of days. This works for fruit flies and also pulls in fungus gnats.

Sticky Traps

Yellow sticky traps are especially effective for fungus gnats. The yellow color attracts them, and they get stuck on contact. You can buy these cheaply at any garden center or online. Stick them directly in the soil of your houseplant or hang them near affected areas. They won’t eliminate gnats on their own, but sticky traps are a good way to monitor how bad the infestation really is and catch adults before they can reproduce.

Red Wine or Beer Trap

Works exactly like the apple cider vinegar trap. Leave a nearly-empty bottle of red wine or beer on the counter — the yeasty, fermenting smell draws gnats inside and they can’t get back out. Easy and effective if you happen to have a bottle lying around.

Getting Rid of Fungus Gnats in Your Houseplants

This is where most indoor gnat infestations start. A fungus gnat infestation in your houseplants is annoying but very fixable once you understand the cycle.

Let the Soil Dry Out

Stop watering so frequently. Fungus gnats are attracted to moisture — without it, they can’t survive in the soil. Let the top two inches of soil dry out completely between waterings. This kills off gnat larvae and makes the soil inhospitable for new eggs. It’s not harmful to most houseplants and it’s the most effective single thing you can do.

Hydrogen Peroxide Soil Drench

Mix one part 3% hydrogen peroxide with four parts water and use it to water your plants instead of plain water. The hydrogen peroxide kills fungus gnat larvae on contact without harming your plants. You’ll hear a slight fizzing sound in the soil — that’s normal. Do this once a week for two to three weeks alongside sticky traps and you should see fungus gnat populations drop significantly.

Top-Dress With Sand or Gravel

A half-inch layer of coarse sand or small pebbles on top of the plant soil creates a physical barrier that makes it hard for female gnats to lay eggs in the soil. It also helps the surface dry faster. Simple and surprisingly effective as a long-term prevention measure.

How to Eliminate Gnats in Drains and the Kitchen

For drain flies and fruit or drain flies generally, the approach is different — you’re cleaning the source, not just trapping adults.

Clean your drains properly. Pour boiling water down affected drains once a week. Follow that with a mixture of baking soda and white vinegar, then flush again with hot water. For persistent cases, use a drain brush to physically scrub the inside of the pipe — that’s where the biofilm that drain flies breed in actually lives.

Empty the trash daily if you have a gnat problem. Even a small amount of food waste is enough to attract gnats inside your house. Keep bins sealed and rinse them out regularly.

Deal with overripe produce. Move fruit to the refrigerator as soon as it starts to ripen. If you’ve got overripe fruit sitting in a fruit bowl, that’s drawing gnats in. Get rid of it or refrigerate it.

Clean up spills immediately. Sticky residue from juice, soda, or alcohol spills is enough to keep gnats around. Check inside cabinets too — a drip behind a bottle you haven’t moved in months is an easy food source you might not think to check.

How to Get Rid of Gnats Outside

Gnats fly in from outside too — and if you’ve got conditions around your home that attract them, you’ll be fighting a constant battle indoors.

Getting rid of gnats outside means looking at a few key things:

  • Standing water — empty bird baths, planters, buckets, and any containers that collect rainwater. Gnats and many other flying insects breed in stagnant water. Even a bottle cap of water is enough.
  • Compost and mulch — keep compost bins sealed and away from entry points. Thick layers of wet mulch near your foundation are attractive to fungus gnats.
  • Outdoor lighting — gnats are attracted to light at night. Switching to yellow LED bulbs near doors and windows reduces how many gnats may fly toward your house after dark.
  • Overripe produce in gardens — fallen fruit from trees and rotting vegetables in garden beds are huge attractants. Clean up organic debris regularly.

How to Prevent Gnats From Coming Back

Once you’ve dealt with an active infestation, keeping your home gnat-free comes down to removing the things that attract gnats in the first place.

  • Water your plants less. Seriously. Most houseplants survive on less water than we think they need, and dry soil is your best defense against fungus gnats.
  • Store fruit in the fridge once it’s ripe.
  • Rinse recycling before it goes in the bin — especially bottles and cans.
  • Keep drains clean with a weekly hot water flush.
  • Check new plants before you bring them home. Nursery plants are a common source of fungus gnat larvae — inspect the soil and let it dry out before placing new plants near your existing ones.
  • Fix any leaks under sinks. Even slow drips keep the area damp enough to be inviting.

When to Call Pest Control

Most gnat infestations are very manageable with the steps above. But there are situations where calling a pest control professional makes sense:

  • You’ve been dealing with gnats for more than four to six weeks with no reduction
  • The infestation is spreading to multiple rooms despite consistent treatment
  • You’re seeing large numbers of gnats inside walls or from hidden areas you can’t access
  • You suspect a plumbing leak or hidden water damage is the root cause

A pest control expert can identify hidden moisture sources and treat areas you can’t easily reach. For fungus gnats in a large plant collection or drain flies in a commercial kitchen, professional treatment is often worth the cost.

Dealing with gnats is mostly about persistence and patience. Traps handle adult gnats; treating the soil, cleaning drains, and removing attractants handle the next generation. Do both at the same time, and most infestations clear up within two to three weeks. The key is not stopping after you see a reduction — keep going until you haven’t seen a gnat in several days. That’s when you know you’ve actually broken the cycle and can get rid of the gnats for good.

You may also like

About Us

Illustrated, step-by-step guides to everyday questions — from fixing a leaky faucet to landing your next job.

Decor & Design

Editors' Picks

Newsletter

Never miss a post from 1lttlestep.
Subscribe to our newsletter for the latest content. We’ll send fresh ideas right to you.

Subscription

@2026 – All Rights Reserved  |  1lttlestep