How Do You Get Rid of Gnats? 5 Fast Fixes for Your House

How Do You Get Rid of Gnats? 5 Fast Fixes for Your House

So, how do you get rid of gnats for good? Match the fix to the fly. A vinegar and dish soap trap catches fruit flies in the kitchen. Scrubbing and flushing the pipe clears drain flies. Letting houseplant soil dry out ends fungus gnats. Sticky traps catch the adults while you work, and cutting off moisture and rotting food keeps them from coming back.

Gnats are hard to beat because the flies you see are only a small part of the problem. The eggs and larvae sit in a drain, a pot of damp soil, or a forgotten piece of fruit. A new batch hatches within days, no matter how many adults you swat.

This guide gives you five methods. Each one tells you which gnat it targets, the exact steps, and what to watch for so the problem stays solved. Pick the one that matches your situation, or pair two for faster results.

1. Vinegar and dish soap trap

A bowl of apple cider vinegar with a few drops of dish soap is the quickest home remedy for fruit flies. It costs almost nothing and starts catching flies within hours.

Four-step diagram showing how to make and use a vinegar and dish soap fruit fly trap.

Best for

This trap suits fruit flies hovering over produce, trash cans and kitchen counters. First confirm which gnat you have, because each type needs a different fix.

TypeWhat it looks likeWhere you find itBest fix
Fruit flyTan or brown, round body, red eyesRipe fruit, trash, recyclingMethod 1
Drain flyFuzzy, moth-like wingsSink, shower and floor drainsMethod 2
Fungus gnatSmall, dark, long legs, like a tiny mosquitoHouseplant soilMethod 3

How to do it

  1. Pour about half a cup of apple cider vinegar into a jar or small bowl.
  2. Add a few drops of dish soap and stir gently.
  3. Leave it uncovered next to the fruit bowl, trash can or sink.
  4. Replace it every two to three days, or sooner once it fills with flies.

Dawn and other dish soaps all work. The soap breaks the surface tension, so flies that land to drink sink instead of floating.

The soap is what makes the trap work, because it turns a bowl of vinegar into something flies cannot escape.

What to watch for

Regular white vinegar works, but fruit flies prefer fermenting smells such as cider vinegar, stale wine or a chunk of overripe banana. If you have none of those, mix yeast and water into a paste, put it in a jar, and tape a paper funnel on top.

Remember that a trap only catches adults. If new flies keep showing up, hunt down the breeding spot: a forgotten onion, a sticky recycling bin, or a damp mop. Throw it out or refrigerate ripe fruit.

2. Drain cleaning for drain flies

If the flies are fuzzy and sit on the wall near a sink or shower, treat the drain. Scrubbing and flushing the pipe is the only way to remove the slime where they breed.

A bottle brush, kettle and drain cleaner bottle next to a kitchen sink drain.

Best for

This method suits drain flies, the moth-like gnats that appear in kitchens, bathrooms and bedrooms with an attached bath. It also covers drains you rarely use. To confirm the source, tape a piece of clear tape over the drain opening overnight. Flies stuck to it in the morning mean the drain is the breeding site.

How to do it

  1. Scrub the inside of the drain and the overflow hole with a stiff bottle brush to remove the film.
  2. Pour very hot water down the drain. Boiling water is fine for metal pipes, but use the hottest tap water if your pipes are PVC.
  3. Add an enzyme-based drain cleaner at night, following the label, so it can work undisturbed.
  4. Repeat daily for one to two weeks.

Drain flies breed in the slime on the pipe wall, so you have to scrub it off, not just rinse it.

What to watch for

Do not mix different drain products. Never combine chemical cleaners. Once the flies are gone, run water in unused drains at least weekly. Also clean the garbage disposal and check floor drains and seldom-used toilets. If flies still appear after two weeks, the problem may be further down the line, and a plumber should look.

3. Dry out houseplant soil

To get rid of gnats around your plants, stop keeping the soil wet. Fungus gnat larvae live in damp topsoil and feed on roots, so dry soil breaks the cycle.

Best for

This fix suits tiny dark flies that rise from a pot when you water, or crawl across the soil. The larvae are translucent white with a black head. They hurt young or weak plants most, so act early on seedlings and cuttings.

How to do it

  1. Water only when the top inch or two of soil feels dry.
  2. Water from the bottom if you can, and empty the saucer after 15 to 30 minutes.
  3. Treat the soil with a mosquito-bits product (Bti) about every two weeks, following the label.
  4. If the soil smells sour or the roots look mushy, repot into fresh potting mix and trim the damaged roots.

Fungus gnat larvae need wet soil, so dry soil is the cure.

What to watch for

Fungus gnats take roughly a month to complete a life cycle, so keep up the routine for three to four weeks. Do not overcorrect and let your plants wilt. Use pots with drainage holes, and keep new plants apart for a couple of weeks before placing them near the rest.

4. Sticky traps and plug-in traps

Traps catch adult gnats of every type and show you whether your fix is working. They do not cure an infestation alone, but they cut the number of flies laying eggs.

A plug-in gnat trap by an outlet and a yellow sticky card in a windowsill plant pot.

Best for

Use them when you want fast, visible results and for any gnat you cannot identify. They suit plant shelves, windowsills and kitchen corners. Yellow sticky cards work well because gnats are drawn to yellow, and plug-in UV traps suit a kitchen with an outlet nearby.

How to do it

Push a sticky stake into each pot so the card sits just above the soil, or hang a card near the problem area. Place two or three cards rather than one. For a plug-in trap, put it near the spot where you see the most flies, and swap the sticky cartridge when it is covered.

A trap tells you whether gnats are still hatching, so count what it catches each day.

What to watch for

Traps do not stop breeding, so pair them with Method 2 or 3. Leave them in place for two weeks after you last see a fly, since eggs may still be hatching. Replace cards when they are crowded, and keep them out of reach of small children and pets.

5. Cut off moisture and food

When gnats keep returning, or you have them in a room with no food, remove what feeds them. Moisture and decaying organic matter are behind nearly every indoor gnat problem.

Best for

This is the right step for the bedroom gnat mystery and for infestations that return after every other fix. It also covers outdoor sources that drift indoors. Check plants, damp laundry, pet bowls, bathroom drains, and any glass with a sip left in it.

How to do it

Take out the trash daily and rinse recycling. Refrigerate ripe fruit and wipe counters at night. Keep humidity below about 55%, the level above which gnats thrive, with a dehumidifier in damp rooms. Outside, clear gutters, empty standing water from saucers and bird baths, and rake away rotting leaves. Switch to yellow or amber outdoor bulbs, which attract fewer bugs than bright white ones.

Gnats follow moisture and rot, so take both away and they have no reason to stay.

What to watch for

Expect a clear drop within a week or two once the source is gone. If swarms continue after three weeks, or flies seem to come from a wall or ceiling, call a plumber or pest professional. Biting gnats outdoors, such as no-see-ums, breed in marshes and streams, so they need screens and protective clothing rather than home traps.

Getting gnats under control for good

Gnats go away when you remove what lets them breed, not when you chase the flies. Identify the type first. Use a vinegar trap for fruit flies, scrub the drain for drain flies, and dry the soil for fungus gnats. Add sticky traps to catch adults, and keep your home dry and free of rotting food.

Stay patient for two to four weeks, because eggs and larvae take that long to clear. For more practical cleaning and pest-control guides, browse Home The Spruce.

Picture of Zain Ali

Zain Ali

I'm a home improvement expert with over 15 years of hands-on renovation and DIY experience. I specialize in breaking down complex projects from plumbing fixes to full remodels into simple, actionable advice anyone can follow. When I'm not writing, you'll find me restoring furniture or tackling my next weekend project.

Latest Post