How to Get Rid of Gnats in the House, by Type

Google Reviews 4.8 Stars
4.8 ★★★★★3,600+ Google Reviews
BBB Accredited Business
Nextdoor Neighborhood Fave 2026 award
NPMA Member
BestCompany.com Best of the Best 2026 award
Published November 13, 2026 Flies Ryan Marshall

Tiny flies drifting around the kitchen, hovering over a houseplant or crawling up the bathroom wall all get called "gnats." They're usually one of three or four different insects, and each one breeds somewhere different. That's why so many gnat fixes fail: a vinegar trap that catches fruit flies does nothing for gnats coming out of a flowerpot.

So the first step is working out which gnat you have. This guide shows how to tell them apart in a minute, then gives the fix for each one. Every method below comes from university extension entomologists, including which popular home remedies have been tested and failed.

Short answer

Find where the gnats breed and remove it. Gnats around houseplants are almost always fungus gnats: let the top 1 to 2 inches of soil dry out between waterings and treat the soil with a Bti product labeled for fungus gnats. Gnats at the fruit bowl or trash are fruit flies: throw out the overripe produce and clean the bins, then use a vinegar trap to catch the rest. Gnats near sinks and tubs are drain flies, which need the inside of the drain scrubbed.

Sprays, foggers and scented "gnat repellents" don't fix any of these, because they leave the breeding source untouched. And the gnats inside your house don't bite.

Which Gnat Is It?

Where you see them tells you more than what they look like, because they're all tiny. Start with this:

Chart identifying indoor gnats by where you see them: fungus gnats around houseplants, fruit flies at the fruit bowl and trash, drain flies near sinks and tubs, and phorid flies running on floors, with the breeding source and fix for each
Where you see them is the fastest clue. Each kind of gnat breeds in a different place, so each needs a different fix.
Fungus gnatFruit flyDrain fly
Where you see itAround houseplants, on the soil, at nearby windows and screensFruit bowl, trash can, recycling, kitchen countersWalls near sinks, tubs and floor drains
Look1/16 to 1/8 inch, black, slender, mosquito-like, with long legs and antennaeAbout 1/8 inch, tan and stocky, usually with red eyesGray, fuzzy, moth-like wings, short hopping flights
Breeds inMoist potting soil rich in organic matterFermenting fruit and vegetables, unrinsed bottles and cans, damp mops and ragsThe slimy film inside drains
Bites?NoNoNo
Close-up of a black fungus gnat with long thin legs, long antennae and clear wings
Fungus gnat. Black, slender and leggy, like a tiny mosquito.
Close-up of a tan fruit fly with bright red eyes and a striped abdomen
Fruit fly. Tan, stocky, and usually red-eyed.

Two quick tests settle it:

  • The vinegar test. Put out a small dish of apple cider vinegar with a drop of dish soap. Fruit flies dive in. University of Wisconsin entomologists note the vinegar traps used for fruit flies don't work for detecting fungus gnats, so if the trap stays empty while gnats circle your plants, you likely have fungus gnats.
  • The potato test. Push a few 1/4-inch slices of raw potato, cut side down, into the soil of a suspect plant. Colorado State Extension says fungus gnat larvae, tiny clear worms with shiny black heads, move to the potato within a few days.

If the gnats are coming from a drain, our guide to getting rid of drain gnats walks through the tape test that finds the right drain and the cleaning that ends them.

How to Get Rid of Fungus Gnats

Fungus gnats are the most common gnat around houseplants. The adults live about a week to 10 days and don't harm plants, but a female can lay up to about 200 eggs in the soil. At room temperature the life cycle takes about three to four weeks, and as little as about 17 days when it's warm. The larvae mostly eat fungi and decaying matter in the soil, though large numbers can chew roots, and seedlings, cuttings and young plants suffer most.

Because there are always eggs, larvae, pupae and adults at the same time, one treatment rarely ends it. Plan on three to four weeks of these steps:

  1. Let the soil dry. Every extension source agrees this is the main fix. Colorado State says to let the top 1 to 2 inches dry between waterings, and Clemson notes that dry conditions kill the larvae. Empty the saucer under each pot so water doesn't stand there. Water less in winter, when plants grow slowly and use less.
  2. Treat the soil with Bti. Bacillus thuringiensis subsp. israelensis is a bacterium that kills the larvae of fungus gnats, mosquitoes and related flies, and nothing else. It's sold in products like Gnatrol and Mosquito Bits. Use one whose label covers fungus gnats in houseplants, at the label rate. It doesn't affect eggs, pupae or adults, and UConn notes some formulas stay active only about two days, so repeat as the label directs.
  3. Or use beneficial nematodes. The nematode Steinernema feltiae is the species UC IPM says works better against fungus gnats than other commercial nematodes, and Colorado State calls particularly effective against the larvae. Apply it to moist soil as a drench.
  4. Catch the adults with yellow sticky cards. Lay them flat on the soil or stake them at the pot's edge. They trap adults and show you whether numbers are falling, but on their own they won't eliminate fungus gnats.
  5. Repot a badly infested plant in fresh, bagged potting mix, and keep the bag sealed and dry so it doesn't get colonized in storage. For any new houseplant, Clemson suggests keeping it away from the rest of your collection for six weeks.

Insecticide sprays are rarely needed for fungus gnats indoors, according to UC IPM, and spraying the air doesn't help because the next generation is in the soil.

Remedies that haven't held up

Fungus gnat advice online is full of home remedies. Here's what the research says about the most common ones:

RemedyWhat the evidence shows
Hydrogen peroxide soil drenchNo extension fact sheet we found recommends it with data, and we found no study testing it in potting soil. The common "1 part peroxide to 4 parts water" ratio isn't from a trial; one Ask Extension expert who gave it advised trying other controls first and not using it on seedlings.
Cinnamon on the soilWe found no published test showing cinnamon controls fungus gnats.
Sand or diatomaceous earth layerSources split. In controlled tests reviewed by Kansas State entomologist Raymond Cloyd, a sand or diatomaceous earth layer didn't stop adults emerging, and UConn says it doesn't prevent egg laying. Purdue and Wisconsin extension still suggest a sand layer to keep the surface drier. Don't rely on it alone.
Vinegar trapsWork for fruit flies, not fungus gnats.
Predatory mitesA greenhouse tool. UC IPM says they probably won't perform well in individual houseplants.

How to Get Rid of Fruit Flies

Fruit flies breed fast: the life cycle takes about a week to 10 days in a warm kitchen, and a female can lay about 500 eggs. University of Kentucky entomologist Michael Potter is blunt: every potential breeding site has to be found and eliminated, or the problem continues no matter how often you spray the adults. Check:

  • Overripe bananas, tomatoes and other produce on the counter
  • Bags of potatoes or onions, where one rotting potato is enough to keep them going
  • The recycling bin, especially unrinsed wine, beer and soda containers
  • The bottom of the trash can, the garbage disposal and kitchen drains
  • Damp mops, sponges and cleaning rags

Once the source is gone, a trap mops up the stragglers. The University of Nebraska recipe: about an inch of apple cider vinegar in a jar, a drop of dish soap to break the surface, and a paper funnel or plastic wrap with small holes on top. Texas A&M points out that traps alone rarely give adequate control, but they help you find the source and confirm it's gone. Replace fermenting baits every few days. Fruit flies peak in late summer and fall, when there's more ripe produce around.

When the Gnats Have No Obvious Source

If you have no houseplants with wet soil, no fruit out and clean drains, and small humpbacked flies keep appearing, often running across the floor before they fly, you may have phorid flies. They breed in almost any moist, decaying material. Texas A&M notes that one hidden source is soil soaked by a leaking sewer line under the house, which can cause severe infestations. That's worth a professional inspection rather than more traps.

Why Gnats Show Up in Fall and Winter

Colorado State says fungus gnat problems are most noticeable in late fall and winter. Plants that spent summer outside often come in already carrying gnats. Then shorter days slow the plants down, so the same watering schedule can leave the soil wet for longer. Texas A&M ties winter infestations directly to overwatering. If gnats appeared a few weeks after you brought plants indoors, that's the likely cause.

Do Gnats Bite?

The gnats inside your house don't. Fungus gnats, fruit flies and drain flies can't bite people. If something is biting you indoors, see our guide to identifying bed bug bites and other common culprits.

The gnats that do bite are outdoors, and the Carolinas and Virginia have plenty:

  • Biting midges, also called no-see-ums or sand gnats. Clemson says they're most common near swamps, marshes, ponds and stream edges, and that females feed mainly early and late in the day. They're about 1/16 inch, so most people never see them. University of Florida entomologists note regular window screens don't keep them out; Clemson recommends 20-by-20 mesh or finer.
  • Eye gnats don't bite, but they swarm around faces where the soil is loose and sandy, and Clemson links them to the spread of pink eye.

Clemson says gnats plague parts of South Carolina each spring and summer, and that wide-area control of biting midges and eye gnats is nearly impossible. University of Florida entomologists say DEET repellents, the same ones used for mosquitoes, are the main repellent used against biting midges.

What Smells Do Gnats Hate?

Lists of "smells gnats hate" (peppermint, lemon, lavender, vanilla, cinnamon) rarely cite any testing, and we found none for those scents against indoor gnats. The research that does exist is small and lab-based:

  • In a Kansas State lab study, chambers with Bounce dryer sheets held 12 to 18% of released fungus gnats, against 33 to 48% in chambers without them. The authors said it wasn't ready to recommend.
  • A 2011 lab study found a few pure compounds, including menthol, repelled fungus gnat adults. That's a pure chemical in a lab, not a peppermint spray in a kitchen.

Even a scent that worked would only push adults around. The next generation is still growing in the soil, the fruit or the drain, which is why removing the source works and scents don't.

What this means in practice

Most gnat problems are a one-room fix you can handle yourself once you know which gnat it is: drier soil and Bti for plants, a cleared counter and a trap for fruit flies, a scrubbed drain for drain flies. It's time to call a professional when you can't find any source, when the flies keep coming from the floor or behind walls, or when you see humpbacked flies running across surfaces in large numbers. Those can point to a hidden breeding site like a plumbing leak, and our residential pest control team can inspect for it.

The short version

  • Identify the gnat first. Around plants: fungus gnats. At the fruit bowl or trash: fruit flies. Near sinks and tubs: drain flies.
  • Fungus gnats: let the top 1 to 2 inches of soil dry, treat with a Bti product labeled for them, and use sticky cards to track progress. Expect three to four weeks.
  • Fruit flies: remove overripe produce and rinse recycling first, then trap the rest with cider vinegar and a drop of soap.
  • Peroxide and cinnamon have no evidence behind them, sand layers get mixed results, and vinegar traps don't catch fungus gnats.
  • Indoor gnats don't bite. Outdoors, no-see-ums near the marsh do. Use fine mesh screens and a DEET repellent.
  • No source you can find? Humpbacked flies running on floors can mean a hidden leak. Get it inspected.

Frequently Asked Questions

Find where they breed and remove it. Around houseplants, let the top 1 to 2 inches of soil dry and treat with a Bti product labeled for fungus gnats. At the fruit bowl or trash, throw out overripe produce, rinse recycling, and set an apple cider vinegar trap with a drop of dish soap. Near sinks, scrub the inside of the drain. Sprays and scents don't stop the next generation.

Most indoor gnats breed in one of three places: wet potting soil (fungus gnats), fermenting fruit and trash (fruit flies) or the film inside drains (drain flies). Fungus gnats are most common in late fall and winter, when houseplants come indoors and the same watering keeps the soil wet longer.

Fungus gnats are small black flies, 1/16 to 1/8 inch long, with long legs and antennae, that breed in moist potting soil. The adults don't bite or harm plants. Their larvae feed mostly on fungi and decaying matter, but large numbers can damage the roots of seedlings, cuttings and young plants.

Let the top 1 to 2 inches of soil dry between waterings, empty saucers, and drench the soil with a Bti product or Steinernema feltiae nematodes labeled for fungus gnats, repeating as the label directs. Yellow sticky cards catch adults and show progress. Expect three to four weeks, since eggs, larvae and adults overlap.

Fruit flies are tan and stocky with red eyes and gather around fruit, trash and recycling. Fungus gnats are black and slender with long legs and hover around houseplants and windows. A vinegar trap catches fruit flies but not fungus gnats, which makes a quick test.

The gnats inside your house don't bite: fungus gnats, fruit flies and drain flies can't bite people. Outdoors, biting midges, also called no-see-ums or sand gnats, do bite, mostly near marshes and ponds early and late in the day. Eye gnats swarm faces but don't bite.

There's little evidence for scents. A Kansas State lab study found dryer sheets reduced the number of fungus gnats in a test chamber, and a few pure compounds such as menthol repelled adults in the lab, but no study we found supports peppermint, lemon, vanilla or cinnamon against indoor gnats. Scents don't stop gnats breeding in soil or fruit.

There's no good evidence it does in potting soil. No extension fact sheet we found recommends it with data, and the widely shared 1-to-4 ratio isn't from a trial. Drying the soil and using Bti or beneficial nematodes are the methods extension entomologists recommend.

Mainly fruit flies. A cider vinegar trap with a drop of dish soap catches fruit flies, but University of Wisconsin entomologists note vinegar traps used for fruit flies don't work for detecting fungus gnats. Traps help most after you remove the breeding source.

When you can't find any breeding source, when flies keep coming from the floor or behind walls, or when you see many humpbacked flies running across surfaces. Those can be phorid flies, which can breed in soil soaked by a leaking sewer line under the house.

Sources: J. A. Bethke and S. H. Dreistadt, Fungus Gnats, UC IPM Pest Notes 7448; W. Cranshaw and R. A. Cloyd, Fungus Gnats as Houseplant and Indoor Pests, Colorado State Extension 5.584; M. Merchant, Indoor Flies and Their Control, Texas A&M ENTO-050; M. F. Potter, Fruit Flies, University of Kentucky ENTFACT-621; Clemson HGIC, Gnats (2489) and Common Houseplant Insects & Related Pests (2252); P. J. Liesch and D. Alfuth, Fungus Gnats on Houseplants, University of Wisconsin Extension; L. Pundt, Managing Fungus Gnats in the Greenhouse, UConn Extension; L. J. Mason, Small Flies, Purdue E-233; S. Browning, Fall-time Fruit Flies, University of Nebraska Extension; R. A. Cloyd, "Ecology of Fungus Gnats in Greenhouse Production Systems", Insects, 2015; R. A. Cloyd and others, dryer sheet repellency study, HortScience, 2010, and volatile alcohols study, Journal of Economic Entomology, 2011; N. Burkett-Cadena and others, Biting Midges, UF/IFAS EENY-349.

Photo credits: xpda, CC BY-SA 4.0, via Wikimedia Commons; Hannah Davis, CC BY-SA 4.0, via Wikimedia Commons.

Protect Your Home From Pests

Licensed, insured pest control for South Carolina, North Carolina & Virginia.

Get a Free Quote

Customer Reviews

What Our Customers Are Saying

B
Brad Simmons
Local Guide · Termite Inspection
★★★★★

"Tony's inspection highlighted several issues. With a good explanation of solutions, he's getting my house back on track."

Verified Google Review
B
Brian Cousins
Local Guide · General Pest Control
★★★★★

"I called at 1pm on a Friday and they squeezed me in the same day, amazing. Mike and Jonathan did a fantastic job explaining the treatment plan."

Verified Google Review
S
Sandra Harvey
Termite Control
★★★★★

"Jonathan is very thorough, friendly and professional. He kept me informed about finding the termites, showing pictures and video."

Verified Google Review