Guide4U logoGuide4U

How to Get Rid of Gnats Indoors

By Sarah Mitchell · 2026-11-06 · 14 min read · Home & DIY — Cleaning & Maintenance
Fruit bowl on a bright kitchen counter with tiny flies nearby

Quick Answer

Figure out which gnat you have first: fungus gnats hover over houseplants, fruit flies gather around ripe fruit, and drain flies sit near sinks. Dry out the top inch of potting soil, set out an apple cider vinegar trap, scrub the drains, and keep the kitchen dry overnight. Most infestations clear in two to three weeks.

First, Figure Out Which Gnat You Have

Gnats are not one bug, and the fix depends on which kind moved in. Fungus gnats are small, dark, and slow, and they hover around houseplants because their larvae live in damp potting soil. Fruit flies are tan with red eyes and show up near ripe fruit, the trash can, or a forgotten onion in the pantry. Drain flies look fuzzy and moth-like and hang around sinks and showers because they breed in the slimy film inside drains. Spend a day watching where they gather before you buy anything. If they cluster over a plant, the soil is the problem. If they hover over the fruit bowl, the kitchen is. If they sit on the bathroom wall, check the drain. Guessing wrong wastes a week, and the gnats will still be there.

Dry Out the Top of the Soil

Fungus gnats lay eggs in the top inch of damp soil, so drying that layer out breaks their life cycle at the source. Stop watering on a schedule and start checking the soil instead: push your finger an inch deep, and water only when it feels dry. Most houseplants are fine with this, and many prefer it, since roots rot in soil that never dries. Pour off any water sitting in the saucer, and empty it after every watering so the plant is never standing in a puddle. For plants that need steady moisture, water from the bottom by setting the pot in a tray for twenty minutes, then lifting it out. The top stays dry, the roots still drink, and the gnats lose the damp nursery they need.

Hand testing dry potting soil in a small houseplant pot
If the top inch of soil feels dry, the gnats lose the damp nursery they need.

Set Out a Vinegar Trap Tonight

A vinegar trap will not fix the source of the gnats, but it will catch the adults flying around your kitchen while you work on that. Pour a few spoonfuls of apple cider vinegar into a small jar or cup, add one drop of dish soap, and leave it open on the counter near where the gnats gather. The vinegar smell pulls them in, and the soap breaks the surface tension so they sink instead of landing on top and flying away. You can cover the jar with plastic wrap and poke a few small holes if you want a tidier trap, but an open jar works just as well. Empty it every day or two and refill it, since a full trap stops catching. Expect to see results within a day, and keep the trap out for at least two weeks to catch new adults as they hatch.

Small glass jar of apple cider vinegar on a kitchen counter
A jar of vinegar with a drop of dish soap pulls in the adults while you fix the source.

Scrub the Drains They Breed In

Drain flies live in the thin, slimy layer of biofilm that coats the inside of drains, and pouring cleaner down the sink will not reach it. You need to scrub the film off the walls of the drain itself. A long bottle brush or an old toothbrush works for the first few inches, and an enzyme-based drain cleaner can help with the parts you cannot reach. Run this routine once a week until the flies are gone, then once a month to keep them away. Never mix cleaners together: bleach plus vinegar or other cleaners can give off harmful fumes, so use one product at a time and rinse well between them.

Clear the Fruit and Food They Feed On

Fruit flies can turn one overripe banana into a cloud of flies in a few days, so the fastest fix is often the simplest: get rid of what they are eating. Move ripe fruit into the fridge, throw out anything soft or bruised, and check the pantry for a forgotten potato or onion that has gone soft in the back of a shelf. Take the trash out every night while the flies are active, and rinse recycling before it goes in the bin, since a sticky soda can is a feast for them. Wipe the counters and the sink after dinner, and do not leave dirty dishes soaking overnight. None of this is glamorous work, but a kitchen with nothing to eat is a kitchen the flies leave on their own.

Stop Watering Your Plants So Often

Overwatering is the single biggest reason fungus gnats show up in a home, and most of us water more than our plants need. A plant in a pot without drainage holes sits in wet soil at the bottom, which is exactly where gnat larvae thrive. Repot into containers with holes, or at least add a layer of pebbles at the bottom so the roots are not sitting in water. Water less in winter, when plants grow slowly and the soil stays wet longer, and always check the soil first. The finger test takes five seconds, and it stops more gnats than any spray on the shelf.

Use Sticky Traps to Catch the Adults

Yellow sticky traps are cheap, and they do two jobs at once: they catch adult gnats, and they show you how bad the problem still is. Stick one in the soil of each affected plant, close to the surface, and check it every few days. When the trap fills up, replace it. The number of gnats on the trap tells you whether your other fixes are working: the count should fall week by week as the larvae die off. Traps alone will not end an infestation, since the larvae in the soil keep hatching, but they cut the number of adults laying new eggs, and they give you a clear sign when the problem is finally over. Keep a trap in place for two weeks after the last gnat disappears, just to be sure.

Try Bti for Gnats That Will Not Leave

If you have dried the soil, set traps, and the gnats are still there after two weeks, the larvae need a stronger answer. Bti, short for Bacillus thuringiensis israelensis, is a naturally occurring bacterium sold as small granules, often under the name Mosquito Bits. Soak the granules in a watering can for half an hour, then water your plants with it. The bacteria kill mosquito and fungus gnat larvae in the soil, but they do not harm the plant, your pets, or you. Repeat the treatment once a week for three weeks to catch each new batch of larvae as it hatches. This is the step that usually ends a stubborn infestation, and it is safe enough to use as a regular part of plant care.

Keep Sinks and Counters Dry Overnight

Gnats look for moisture at night, when the house is quiet and the kitchen is dark. A sink with a few drops of water in it, a damp sponge, or a wet dish rack is enough to keep them fed and breeding. Make a habit of wiping the sink dry before bed, wringing out the sponge, and standing it on end so it dries. Do not leave glasses with a sip of juice or a wet cutting board on the counter. This sounds fussy, but it takes less than a minute, and a dry kitchen overnight is a kitchen the gnats cannot use. Combine this with the vinegar trap, and the adults that survive the day will have nowhere to feed and nothing to drink by morning.

Seal the Small Gaps They Slip Through

Gnats are tiny enough to come through a torn window screen or the gap under a door, so some of them are not breeding in your home at all: they are walking in from outside. Check the screens on the windows you open most, and patch any hole with a small repair kit or a dab of clear nail polish on a tiny tear. Add a door sweep to exterior doors, and seal the gap around pipes under the sink with caulk, since gnats follow the same routes as drafts. This will not solve an infestation that is already breeding indoors, but it stops new gnats from arriving once you have cleared the ones inside. Think of it as locking the door after the guests have left.

When It Is Time to Call a Pest Pro

Most gnat problems clear up in two to three weeks with the steps above, but a few need professional help. If you have tried drying the soil, traps, and Bti, and the numbers are not falling after a month, the breeding site is probably somewhere you cannot see, like a cracked drain pipe inside a wall or a leak under the floor. Call a pest control company and tell them what you have already tried, so they do not repeat the same steps. They can inspect the drains with a camera and treat hidden breeding sites directly. A single visit usually costs less than a month of sprays and traps that are not working, and it ends the problem instead of managing it.

✅ Guide4U Checklist

  • Identify the gnat type first
  • Let the top inch of soil dry
  • Set out a vinegar trap
  • Scrub drains weekly
  • Move ripe fruit to the fridge
  • Wipe the sink dry nightly

Key Takeaways

  • The fix depends on the gnat type
  • Dry soil breaks the fungus gnat cycle
  • Traps catch adults, not larvae

Frequently Asked Questions

How long does it take to get rid of gnats indoors?

Most infestations clear in two to three weeks if you fix the source. The adults you see today die within days, but eggs and larvae in soil or drains keep hatching for a while, so you need to keep the traps and the dry-soil routine going for at least two weeks after the last gnat disappears.

Are gnats harmful to humans?

Fungus gnats and fruit flies do not bite people, and they do not spread disease the way mosquitoes do. They are a nuisance, not a health threat, though a large fungus gnat infestation can damage seedlings and young plants by eating their roots. Drain flies are also harmless to people, but they are a sign that a drain needs cleaning.

Will a vinegar trap alone get rid of fungus gnats?

No. A vinegar trap catches the adults, but the larvae keep growing in the soil and hatching into new adults. You need to dry out the top of the soil, or treat it with Bti, to stop the next generation. Use the trap alongside the soil fix, not instead of it.

Why do gnats keep coming back after I clean?

Usually because the breeding site is still there. A damp plant, a drain with biofilm, or a piece of fruit hidden behind something can keep producing gnats for weeks. Check every plant, scrub every drain, and look for forgotten food. If the numbers do not fall after a month, the breeding site may be hidden, and a pest pro can find it.

Related Guides

How to Get Rid of Fruit Flies in Your Kitchen Fast (Traps That Actually Work)Fruit flies clouding up your kitchen? Here is the exact vinegar trap that catches them, how to find where they…How to Get Rid of Mice in Your House Naturally (and Keep Them Out)Mice come for food, warmth, and shelter, and scent tricks alone will not send them away. Cut off the food, sea…How to Get Rid of Bed Bugs for Good (Without Throwing Everything Away)Bed bugs are beatable without throwing out your furniture. Confirm the signs, work room by room with heat, vac…How to Get Rid of Drain Flies in Your Bathroom Sink for GoodDrain flies live in the slimy film inside your drain, so sprays aimed at the air never finish the job. Scrub t…
Tags: gnats, fruit flies, fungus gnats, pest control, houseplants

What did you think of this article? Share your opinion in the comments below — we would love to hear from you.

Comments & Reviews

Comments are checked before they appear on this page.

Loading reviews...

Share your thoughts

Your rating (optional)