How Do You Get Rid of Gnats in Your House for Good?

Last updated: May 22, 2026

Knowing how to get rid of gnats starts with correctly identifying which of four species is actually in your house: fungus gnats from overwatered potting soil, drain flies from biofilm inside pipes, fruit flies from fermenting produce, or phorid flies from a deeper sewage or carcass source. The treatment is different for each, and the wrong treatment wastes 7 to 14 days while the larval cycle continues. Most homeowners eliminate a gnat infestation in 10 to 21 days using a two-step approach: remove the breeding source (the single non-negotiable step) and trap adults with apple cider vinegar bowls or yellow sticky cards while the larval generation dies off. Total DIY cost is typically under $25. Professional treatment, warranted when phorid flies appear or the source cannot be located, runs $150 to $500 depending on whether plumbing inspection is needed.

For broader cost context across pest categories, see our pest control cost guide. If your gnat problem has crossed into a structural moisture issue, our best pest control companies guide outlines what to look for when hiring out.

Identifying the Type of Gnat (Fungus Gnat vs Fruit Fly vs Drain Fly vs Phorid Fly)

The four small flies homeowners lump together as "gnats" look similar at a glance but breed in completely different places. Spending five minutes on identification before treating saves weeks of wrong-target effort. Watch where they congregate, look at body shape under a phone camera zoom, and check whether they fly continuously or run across surfaces.

Fungus gnats

Fungus gnats are about 1/8 inch long, dark gray to black, with long dangling legs that are clearly visible when they fly. They are weak fliers and tend to hover in lazy zigzags within a foot of houseplant soil or near window glass where light attracts them. Adults live 7 to 10 days; females lay up to 200 eggs in the top half inch of moist potting soil. Larvae are translucent with black head capsules and feed on fungi, decaying organic matter, and fine plant roots. A heavy infestation can stunt seedlings and damage tender root systems on plants like African violets and fiddle-leaf figs. The life cycle runs 17 to 21 days at typical indoor temperatures, which is why piecemeal treatment so often fails: kill the adults you see today and a fresh batch hatches a week later.

Fruit flies

Fruit flies (Drosophila melanogaster and related species) are 1/8 inch long, tan to brown, with distinctive bright red eyes visible in good light. They are strong fliers and hover precisely over fruit bowls, open wine bottles, fermenting beer, kombucha cultures, and any sugary residue. The full life cycle runs only 8 to 10 days at 75 to 80 degrees, which is why a single forgotten peach can produce hundreds of flies inside a week. They are most prevalent from July through October across most of the U.S. and year-round in Florida, south Texas, and southern California. Fruit flies will also breed in mop heads, sponges, and the bottoms of recycling bins coated with soda or beer residue, which is why kitchen sanitation alone often misses the actual source.

Drain flies

Drain flies (also called moth flies, family Psychodidae) are noticeably fuzzy with broad, rounded wings held tent-like over the body when at rest. They are 1/8 to 1/4 inch long, gray to tan, and look almost like tiny moths. They are weak fliers and short hoppers; you will usually find them resting motionless on tile walls above sinks and showers, on the underside of toilet rims, and on basement walls near floor drains. Larvae live inside the gelatinous biofilm that coats the interior of drain pipes, feeding on bacteria, hair, soap scum, and food residue. Because biofilm regrows from microscopic remnants, drain fly populations are the hardest of the four to eliminate; physical scrubbing has to be paired with enzyme treatment to break the cycle.

Phorid flies

Phorid flies (Megaselia scalaris is the most common indoor species) are 1/16 to 1/8 inch long, brown to black, with a clearly humped thorax giving them the nickname "humpbacked flies." The behavioral tell is unmistakable: when disturbed, they run rapidly across a surface rather than flying away. Phorid flies breed in any decomposing organic matter, which makes them the most concerning of the four. Documented breeding sources include broken sewer lines beneath slab foundations, leaking wax rings under toilets, rodent carcasses in wall voids, dead animals in HVAC ductwork, garbage disposal interiors, and even improperly capped abandoned drain stubs. A phorid fly outbreak with no obvious food source is a structural problem, not a sanitation problem, and warrants a plumbing camera inspection before chemical treatment.

Species Size / Appearance Behavior Breeding Source Life Cycle
Fungus gnat 1/8 in, dark, long legs Weak flight, near soil and windows Top 1/2 in of moist potting soil 17 to 21 days
Fruit fly 1/8 in, tan, red eyes Strong flight, hovers over food Fermenting produce, drains, recycling 8 to 10 days
Drain fly 1/8 to 1/4 in, fuzzy, moth-like Rests on walls, weak flight Biofilm inside drain pipes 10 to 15 days
Phorid fly 1/16 to 1/8 in, humped thorax Runs across surfaces Sewage, carcasses, decomposing matter 14 to 37 days

Fungus gnats vs fruit flies: the two most confused species

Homeowners mix up fungus gnats and fruit flies more than any other pair, and the treatments are completely different. Fungus gnats are dark, slow, and hover near plants and windows; fruit flies are tan, fast, and hover over food. Treating a fungus gnat problem with apple cider vinegar traps alone will catch some adults but leave the houseplant soil teeming with larvae, so the infestation never ends. Treating a fruit fly problem with a hydrogen peroxide soil drench accomplishes nothing because the breeding source is in the kitchen, not the planter. If you are seeing them near light fixtures and your finger comes out wet when you push it into potting soil, you have fungus gnats. If they are swarming a banana, you have fruit flies.

Quick-Fix Protocol: What to Do in the First 24 Hours

If you need to start now and read the rest later, this is the sequence that breaks the infestation fastest regardless of species. Total time investment is about 45 minutes; total material cost is under $15 if you already have basic kitchen supplies.

  1. Walk the house with a notepad. Note every spot where you see two or more gnats. Spots near plants point to fungus gnats; spots near sinks and showers point to drain flies; spots near food point to fruit flies; spots near floor drains or baseboards with no visible food point to phorid flies.
  2. Bag and remove organics. All overripe fruit, open wine and beer, potatoes or onions starting to sprout, contents of the fruit bowl, and any food waste in the trash. Tie the bag and take it outside immediately, not into the garage.
  3. Boil two kettles of water. Pour boiling water slowly down every drain in the house: kitchen sink, both sides if double basin, bathroom sinks, shower drains, tub drains, basement floor drains, laundry standpipe. This alone kills surface larvae and disrupts biofilm.
  4. Set three apple cider vinegar traps. Small bowl or glass, one inch of apple cider vinegar, two drops of dish soap, plastic wrap secured with rubber band, six toothpick holes punched in the wrap. Place one in the kitchen, one near the worst houseplant, one in the bathroom where you have seen flies.
  5. Check every houseplant. Push your index finger two inches into the soil of each pot. If it comes out wet or muddy, that plant is a fungus gnat candidate. Stop watering immediately. Plan to apply a hydrogen peroxide drench tomorrow once the surface is dry.
  6. Pull the rubber splash guard out of the garbage disposal and scrub the underside with an old toothbrush and dish soap. This is the single most-missed breeding site in any kitchen with disposal-fed drain flies.
  7. Tape clear plastic over each suspect drain overnight. Gnats emerging from a drain will be trapped against the plastic by morning, which confirms the source so you can target treatment there.

Expect visible adult populations to drop by at least half within 48 hours. If they do not, you have either missed a source or are dealing with phorid flies that require a different approach (covered below).

Finding the Breeding Source (the Step That Actually Ends the Cycle)

Apple cider vinegar traps and yellow sticky cards kill adults that exist today. They do nothing to the eggs and larvae that will hatch tomorrow. Locating and destroying the breeding source is the only step that breaks the cycle, and it is also the step most homeowners skip because it requires opening cabinets, pulling appliances, and getting on hands and knees.

Overwatered houseplants (the #1 source by a wide margin)

Fungus gnats need moist soil throughout the top half inch to complete their life cycle. Soil that dries out completely between waterings kills larvae through desiccation within 24 to 48 hours, which is why simply adjusting your watering schedule eliminates most light infestations within two to three weeks. Check every pot, including plants in low-light rooms you may forget about. Self-watering planters and decorative pots without drainage holes are particularly prone to fungus gnat infestations because the bottom inch of soil stays permanently saturated. Pothos, peace lilies, monstera, fiddle-leaf figs, and African violets are the most commonly affected because they tolerate frequent watering. Snake plants and succulents almost never harbor fungus gnats because their soil dries fully between waterings by design.

Drains and the garbage disposal

Tape a piece of clear plastic wrap over each drain at night with the sticky side down. Any gnats emerging during the night get trapped against the adhesive, which both confirms the source and gives you a count of activity. The most commonly missed drain in any home is the basement floor drain, which often goes weeks without water flow and develops thick biofilm. Other overlooked drains: the bathroom sink in a guest bathroom that gets occasional use, the wet bar sink in a finished basement, the laundry sink, and the AC condensate drain. The garbage disposal deserves its own attention; pull the rubber splash guard out and check the underside, which is where biofilm collects out of sight of any product you pour down the drain.

Rotting produce and food waste

Walk the kitchen systematically. Check the fruit bowl, the bottom of the produce drawer in the refrigerator (forgotten celery, wilted lettuce, sprouted potatoes), the back of pantry shelves where onions or potatoes may be hidden in paper bags, the bottom of the trash can beneath the bag liner where drips collect, the bin lid for residue, and the recycling bin for beer or soda residue. A single forgotten peach can sustain hundreds of fruit flies for two weeks. Garages and mudrooms used for recycling storage are frequent sources during summer months.

Hidden moisture sources

When the obvious sources are clean and gnats persist, the breeding site is somewhere with hidden moisture. The most common: the drip pan under the refrigerator (pull the fridge out and check), the drain pan under an automatic icemaker, the catch tray beneath a dehumidifier or window AC unit, condensation collected on the underside of a dish rack, a wet sponge or dishcloth left in a cabinet, a leaky P-trap under a bathroom or kitchen sink that has been slowly dampening the cabinet floor, and water-damaged subfloor or drywall from a past leak that has not fully dried.

Structural and plumbing sources (phorid fly territory)

If you have eliminated all visible sources and phorid flies (humpbacked, run rather than fly) continue to appear, the breeding site is almost certainly inside the structure. Common locations include a cracked drain line beneath a concrete slab where sewage leaks into the soil, a failed wax ring under a toilet allowing waste to seep onto the subfloor, a dead rodent in a wall void or attic, an abandoned drain stub that was capped but never properly sealed, and HVAC condensate drainage that has saturated nearby insulation. These sources require professional inspection. A plumbing contractor with a drain camera will run $200 to $500 for inspection, and the repair cost varies enormously based on what is found.

DIY Treatment Methods That Actually Work

Once the breeding source is identified, these methods knock down adult populations and accelerate the timeline to full elimination. Use multiple methods simultaneously rather than trying them one at a time.

Apple cider vinegar trap

Pour one inch of apple cider vinegar into a glass, mason jar, or shallow bowl. Add two drops of dish soap (Dawn works best because of its surfactant properties) and swirl gently. Cover with plastic wrap and secure with a rubber band, then punch six to eight holes with a toothpick. The vinegar fermentation odor attracts fruit flies and fungus gnats; the dish soap breaks surface tension so adults sink and drown; the plastic wrap holes let them in but discourage exit. Place traps within direct sight of the worst gnat activity and replace every two to three days. Apple cider vinegar works better than white vinegar because of its fruit-based aroma. For fungus gnats specifically, a slice of overripe banana in the bottom of a covered glass with the same dish-soap-and-plastic-wrap setup outperforms vinegar.

Hydrogen peroxide soil drench (fungus gnats)

Mix one part 3% hydrogen peroxide (the standard drugstore brown bottle) with four parts plain tap water. Water each affected houseplant with this solution until liquid runs out the drainage holes. The soil will fizz for 30 to 60 seconds as the peroxide oxidizes larvae on contact. The dilution is safe for almost all common houseplants; aquatic plants and ferns can be sensitive, so spot-test if uncertain. Repeat every five to seven days for three consecutive applications. The first drench kills active larvae, the second catches new larvae from eggs that survived, and the third catches stragglers from the final cohort of eggs laid before adults died off.

Bti (Bacillus thuringiensis israelensis) for larval control

Bti is a naturally occurring soil bacterium that produces a protein lethal to fungus gnat, mosquito, and blackfly larvae but harmless to plants, pets, humans, and pollinators. It is sold as Mosquito Bits (granules, the most common consumer product), Mosquito Dunks, or Gnatrol (a liquid concentrate aimed at commercial growers). For fungus gnats, sprinkle one tablespoon of Mosquito Bits on the soil surface of each affected pot and water normally; the granules release Bti into the soil where larvae ingest it and die within 24 hours. Reapply every two weeks for two months. Bti is the single most effective long-term tool against fungus gnats because it provides residual larval control between hydrogen peroxide drenches.

Enzyme drain gel for drain flies

Enzyme drain gels (InVade Bio Drain, Bio-Clean, Drano Max Build-Up Remover) contain bacteria and enzymes that digest the organic biofilm drain flies breed in. Standard chemical drain cleaners like Drano or Liquid-Plumr do not eliminate drain flies because they pass through quickly and do not break down biofilm; they unclog pipes but leave the gnat food source intact. Apply enzyme gel at night when the drain will not be used for at least eight hours. Pour the recommended dose directly into the drain, then add just enough water to push it down to the P-trap. For active infestations, repeat nightly for 7 to 10 days, then weekly for maintenance. Use a stiff drain brush to physically scrub the upper four inches of pipe before the first application; this removes the thickest buildup and exposes deeper biofilm to the enzyme.

Yellow sticky cards

Yellow sticky cards exploit fungus gnats' attraction to that specific wavelength. They are sold in packs of 25 for $8 to $12 at any garden center. Cut cards into quarters and place them flat on the soil surface of each affected pot, or stake them upright with a wooden skewer. Cards trapped on the soil surface also catch adults emerging from the soil before they can fly to find a mate, which compounds the effect. Replace cards when 50% covered. Yellow cards do not work for fruit flies or drain flies, which respond to scent rather than color cues.

Removing attractants and modifying habits

Move all ripe fruit into the refrigerator. Empty kitchen trash every two days during summer. Use a trash can with a tight-fitting lid and rinse the can interior weekly with hot water and bleach. Rinse every beer, soda, and wine container before placing in recycling. Run hot water down every drain in the house for 30 seconds at least twice a week, including drains in unused bathrooms. Pour a half cup of bleach down the AC condensate drain monthly during cooling season. Empty plant saucers within 30 minutes of watering.

DIY Treatment Cost Breakdown

National Average Cost
Estimated ranges based on national averages. Actual costs vary by provider, location, and scope of service.
Treatment Target Species Cost Where to Buy
Apple cider vinegar (16 oz) Fruit flies, fungus gnats $3 to $5 Grocery store
3% hydrogen peroxide (32 oz) Fungus gnat larvae $2 to $4 Drugstore, grocery
Mosquito Bits (8 oz, Bti) Fungus gnat larvae $10 to $14 Home Depot, Lowe's, Amazon
Yellow sticky cards (25 pack) Fungus gnat adults $8 to $12 Garden center, Amazon
Enzyme drain gel (32 oz) Drain flies $15 to $25 Hardware store, online
Drain brush (12 to 36 in) Drain flies (prep) $8 to $15 Hardware store

When Gnats Indicate a Bigger Problem

A gnat infestation that does not respond to systematic source removal and standard DIY treatment is almost always pointing at a structural problem. Recognizing these signals early saves weeks of frustrated effort and, in the case of phorid flies, can identify a sanitation hazard before it becomes a serious one.

Phorid flies with no visible food source

Phorid flies breeding in numbers without an obvious food source near drains or trash is a serious finding. Documented sources include broken cast-iron drain lines beneath slab foundations (common in homes 50+ years old), failed wax ring seals under toilets allowing sewage to wick into subfloor, rodent or squirrel carcasses in wall voids or attics, dead birds or rodents in HVAC ductwork, and abandoned drain stubs that were capped but not properly sealed. The treatment for these sources is structural repair, not insecticide. A pest control technician can confirm species identification and recommend the right diagnostic step; the actual repair is typically a plumber or general contractor.

Drain flies that return within days of every treatment

Drain flies that come back within 48 to 72 hours of enzyme treatment usually mean the biofilm is regrowing from a source deeper than the gel can reach, or there is a defect in the pipe itself: a hairline crack in cast-iron, a separated joint, a partial blockage that retains standing organic matter, or a vent stack issue causing siphoning. A plumber with a sewer camera can identify the issue, typically for $200 to $400. If the pipe is intact, the drain may simply need a more aggressive professional enzyme treatment using foaming applicators that coat the entire interior surface rather than just the bottom.

Fungus gnats that persist through complete soil replacement

If fungus gnats remain even after you have repotted every plant with sterile potting mix and let saucers dry completely, look for hidden moisture in the structure. Common culprits: a slow leak in a window planter box, condensation pooling in the bottom of a decorative cachepot, soil that fell behind a shelf and stayed damp, and excess moisture from a humidifier that has saturated nearby surfaces. Fungus gnats can also breed in damp organic mulch in atrium plantings or near indoor water features.

Health-department implications in commercial spaces

Restaurants, food trucks, breweries, daycare facilities, and grocery stores face health-department citations for visible drain fly or fruit fly activity in food prep areas. The standard remediation in commercial spaces involves professional drain treatment with foaming enzyme products, often combined with insect light traps placed strategically per FDA guidelines (not directly over food prep surfaces, and far enough from doors to avoid drawing pests in). Commercial treatment typically runs $200 to $500 per service visit with monthly maintenance contracts at $75 to $150 per visit.

Professional Treatment: Costs and What You Get

Professional pest control becomes worth the cost when DIY has failed past the four-to-six-week mark, when phorid flies suggest a structural source, or when access limitations (a finished basement with floor drains, a built-in refrigerator, a slab foundation) make the breeding source physically unreachable. National companies and reputable local operators offer similar services at similar prices for gnat work.

Service What It Covers Typical Cost
Single-visit drain treatment Foaming enzyme application to all interior drains, garbage disposal flush, exterior cleanout treatment $150 to $300
Interior crack-and-crevice service Targeted residual insecticide in resting areas plus growth regulator application, typically 1 to 2 hours on site $125 to $275
Plant soil treatment (commercial-grade) Professional Bti or insect growth regulator drench on affected plants, often paired with sticky card monitoring $75 to $175
Plumbing camera inspection Sewer scope of main drain line and accessible branches to identify cracks, separated joints, or hidden moisture $200 to $500
Full structural diagnosis (phorid flies) Pest tech plus plumber coordination, may include thermal imaging or moisture meter inspection $350 to $800
Monthly maintenance program Recurring drain treatment and monitoring, common for chronic issues or commercial accounts $50 to $125 per visit
How We Research These Prices

The pricing data in this guide comes from industry surveys, contractor interviews, and analysis of real service quotes across US markets. All prices are estimated ranges based on our research, not guaranteed quotes. We review and update this data regularly. Read our full methodology

Pricing varies by region. Coastal metros (Boston, Seattle, San Francisco, New York) run 20 to 35 percent above the national midpoint. Southern and Midwestern markets typically come in at the lower end of each range. For city-specific pest control pricing context, see our state guides for California and Arizona, or major-metro pages like Atlanta, Austin, Boston, and Charlotte.

What to ask before hiring

  • Species identification on the first visit. A competent technician will collect a specimen and confirm species before recommending treatment. Anyone offering a "gnat package" without identification is selling a generic service.
  • Source-location commitment. The contract should specify that the technician will locate the breeding source, not just treat resting surfaces. Ask how they will document the source.
  • Product disclosure. Reputable operators will tell you exactly what products they are applying (active ingredient, formulation, application method) and provide labels and SDS on request.
  • Reentry intervals. Some residual sprays require 1 to 4 hours of vacancy after application. Confirm before scheduling, especially in homes with infants, pets, or anyone with respiratory sensitivity.
  • Warranty and retreatment policy. Most reputable operators include a 30 to 90 day retreatment window at no additional charge if the problem returns.
  • Specific licensing. Ask for the technician's state pesticide applicator license number and the company's structural pest control license. These are public records in every state.

Prevention: How to Keep Gnats Out for Good

Most gnat infestations are preventable with a handful of consistent household habits. The cost of prevention is essentially zero; the cost of a serious infestation can be hundreds of dollars and weeks of disruption.

  • Bottom-water houseplants when possible. Setting pots in a tray of water for 20 minutes once weekly, then removing them, keeps the top inch of soil dry where fungus gnats breed while delivering moisture to roots. This single change eliminates fungus gnat habitat in most cases.
  • Top-dress plant soil with horticultural sand or perlite. A half-inch layer of coarse material on top of potting soil physically blocks adult fungus gnats from laying eggs and prevents larvae from emerging. Diatomaceous earth works similarly but loses effectiveness when wet.
  • Run every drain in the house weekly. Even unused guest bathroom sinks and basement floor drains. Sixty seconds of hot water flushes biofilm before it accumulates to breeding density. Add a half cup of enzyme drain gel monthly to drains in low-use bathrooms.
  • Refrigerate ripe produce. Once any fruit shows soft spots or begins to give off odor, move it to the refrigerator or freezer for compost storage. Counter-displayed produce should be eaten within three days of full ripeness.
  • Empty kitchen trash every two days in summer. Food waste ferments within 24 to 48 hours in a warm kitchen. Use a kitchen trash can with a tight-fitting lid and a foot pedal so the lid stays closed between uses.
  • Rinse and dry recycling. Beer and soda residue at the bottom of cans is a top fruit fly breeding source in garage recycling bins. A 10-second rinse eliminates it.
  • Inspect bagged produce on the way home from the store. Bananas, peaches, tomatoes, and strawberries can arrive with fruit fly eggs already on the skin. Wash and inspect before putting away.
  • Inspect potting soil at purchase. Some retailers store potting mix outdoors where fungus gnats can colonize open bags. Look for small white larvae near the top of the bag and avoid any soil that shows visible insect activity. Sterile, pasteurized, or peat-based mixes from sealed bags are lowest risk.
  • Fix slow drains within a week. A drain that runs slowly retains standing water and organic matter, both of which support drain fly breeding. Address slow drains promptly rather than letting them linger.
  • Maintain window screens. Outdoor gnats push indoors through screens with even pinhole tears. Inspect screens each spring and repair tears with patch kits or replacement screening.

Seasonal Patterns and Regional Variation

Gnat pressure follows predictable seasonal cycles that vary by climate zone. Understanding when each species peaks helps you preempt infestations rather than react to them.

Fruit fly populations peak from mid-July through early October across most of the U.S. as outdoor fruit ripens and warm indoor temperatures accelerate breeding. In Florida, the Gulf Coast, and southern California, fruit flies are active year-round at reduced but never zero pressure. Northern climates see near-elimination of indoor fruit flies from December through March, though imported produce can reintroduce them at any time.

Fungus gnat infestations are largely seasonal in the opposite direction: peak indoor problems occur from October through April when houseplants are watered without compensating reductions for lower light and slower growth. Many homeowners continue summer watering schedules into fall when plants need 30 to 50 percent less water, creating ideal fungus gnat conditions.

Drain fly activity stays relatively constant year-round indoors because plumbing temperatures are stable, but populations build noticeably during periods when occupants are away (vacations, second-home stays) because drains go unflushed. Returning to a vacation home after two weeks away is the single most common trigger for drain fly discovery calls to pest control operators.

Phorid fly activity is event-driven rather than seasonal: a sewer line failure, a rodent death in a wall, or a slow toilet leak triggers an outbreak regardless of season. However, warm-season conditions accelerate decomposition, so summer outbreaks tend to escalate faster than winter ones.

Regional considerations also matter. Homes on slab foundations (common across the Sun Belt) are at higher risk of phorid fly outbreaks from sewer line cracks because the drain piping is inaccessible without slab penetration. Homes with crawl spaces (Pacific Northwest, parts of the Southeast, older Midwest construction) are at higher risk of moisture-driven fungus gnat sources in subfloor insulation. Multi-family buildings, especially older ones, present unique drain fly challenges because shared vent stacks and waste lines mean treatment in one unit may not solve problems originating in another.

Gnats are often a gateway pest problem: the conditions that allow them to breed (excess moisture, decaying organic matter, food residue) also support other pest activity. Homeowners dealing with gnats frequently see ant activity simultaneously, especially during summer months when both pests are attracted to kitchen residue. See our cost guides on ant exterminator cost and our city-level pages for Dallas, Houston, Phoenix, and Tampa if ants have also appeared.

If you are evaluating pest control timing more broadly, our guide on best time of year for pest control outlines when preventive service delivers the most value across multiple pest categories. For state-specific pricing context, see Alabama, California, and Arizona pest control cost guides.

Frequently Asked Questions

Frequently Asked Questions

What is the fastest way to get rid of gnats?

The fastest results come from a two-pronged attack: kill the breeding source within the first 24 hours and trap adults at the same time. For fruit flies, that means bagging all overripe produce, running hot water down kitchen drains for 60 seconds, scrubbing the garbage disposal with a stiff brush, and setting apple cider vinegar traps within sight of where you saw them swarm. For fungus gnats, drench houseplant soil with a one-part 3% hydrogen peroxide to four-part water solution, then place yellow sticky cards flat on the soil surface. Expect adult populations to drop sharply within 72 hours and full elimination within 10 to 14 days once the larval cycle breaks.

How do I get rid of gnats when I can't find the source?

Hidden sources are almost always one of five places: the drip pan beneath the refrigerator, the overflow drain on a rarely used sink, soggy soil in a plant you forgot about (often in a low-light room), a sponge or mop left damp in a closet, or condensation under a dish drying rack. Move the fridge out and check the coil pan. Pour boiling water down every drain in the house including basement floor drains and laundry standpipes. Tape clear plastic over each drain overnight; gnats trapped against the plastic by morning confirm that drain is the source. If phorid flies (humpbacked, run rather than fly) appear with no visible source, the breeding site may be inside a wall void or beneath a slab and requires a plumber's camera inspection.

Why is my house full of gnats all of a sudden?

A sudden swarm almost always means a hatch event from a single source that has been building for 10 to 21 days unnoticed. The most common triggers: a bag of potatoes or onions that started to rot at the back of a pantry, a houseplant that was overwatered during a vacation, a load of recyclables that sat warm in a garage, a slow drain that finally accumulated enough biofilm to support a full larval generation, or new potting soil that arrived pre-infested with fungus gnat eggs. Seasonal spikes also occur in late summer when fruit ripens fast and again in early fall when outdoor populations push indoors through window screens with even small tears.

What smells do gnats hate?

Gnats avoid peppermint, eucalyptus, lavender, citronella, lemongrass, and cedar. A spray bottle with 10 to 15 drops of peppermint or eucalyptus essential oil per cup of water, misted around window frames and entry points, deters adult gnats from settling. Bay leaves placed in flour and grain canisters repel fungus gnats that hitchhike on produce. However, scent-based repellents do not kill larvae or stop breeding; they only push adults away from treated zones. Use them as a layer on top of source removal, not as a primary control. Vanilla extract, by contrast, attracts gnats and should be capped tightly.

Why do I keep getting gnats even after cleaning?

Persistent gnats after cleaning usually mean one of the breeding sources survived. The most overlooked are the rubber gasket inside the garbage disposal (biofilm there is not reached by standard cleaning), the P-trap of a bathroom sink that is only used for hand washing, the drain pan beneath an automatic icemaker, and the saucers beneath houseplants where standing water collects. Pull the rubber splash guard out of the disposal and scrub the underside. Run a bottle brush coated with enzyme gel through bathroom P-traps. Empty plant saucers daily for two weeks. Larval cycles run 7 to 14 days, so cleaning must continue past the visible adult population for at least one full cycle.

Are gnats harmful to humans?

Most indoor gnats do not bite and pose no direct health risk to people. Fungus gnats and fruit flies are nuisance pests only. Drain flies can mechanically transfer bacteria from drain biofilm to food surfaces if populations are large, which is a sanitation concern in kitchens. Phorid flies are the meaningful exception: they breed in decomposing organic matter and have been documented transferring pathogens from sewage or carcass sources to clean surfaces, which is why their presence warrants tracing to a specific cause rather than spraying alone. Outdoor biting midges sometimes called gnats (no-see-ums, buffalo gnats) are a separate category and do bite.

Does hydrogen peroxide kill fungus gnat larvae?

Yes. A solution of one part 3% hydrogen peroxide to four parts plain water, applied as a soil drench until liquid runs from the drainage holes, kills fungus gnat larvae on contact through oxidation. The soil will fizz for 30 to 60 seconds, which is the reaction breaking down larval tissue. Most houseplants tolerate this dilution without leaf burn or root damage. Repeat every five to seven days for three consecutive treatments to catch larvae that hatch from eggs after the first application. Pair with Bti (Mosquito Bits) crumbled on the soil surface for residual control between drenches.

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

With consistent source removal and trapping, expect a 70 to 80 percent reduction in visible adults within 5 days and full elimination in 10 to 21 days. The timeline is dictated by the fungus gnat life cycle (17 to 21 days egg to adult) or the fruit fly life cycle (8 to 10 days). Drain fly infestations take longer, often 3 to 4 weeks, because biofilm regrows and pupae can survive single chemical treatments. If you still see adults after 30 days of consistent treatment, the source has not been correctly identified or there is a secondary source you have not yet found.

When should I call a professional for gnats?

Call a licensed pest control operator when gnats persist past 4 to 6 weeks of consistent DIY treatment, when phorid flies appear in numbers without a visible food source, when drain flies return within days of every treatment (suggesting a deep biofilm or pipe defect), or when the infestation is in a commercial kitchen or food-handling area subject to health-department inspection. Professional treatment typically runs $150 to $350 for a residential drain or interior service. If a plumbing camera inspection is needed, add $200 to $500 depending on access. See our guide on pest control cost for broader pricing context.
When You Call

Calling the number on this page connects you with a pest control professional who services your area. There is no cost to you for making the call, and you are under no obligation to hire. We may earn a referral fee when homeowners connect with providers through our site. This does not affect the pricing data or advice in our guides. Learn how we operate

P

Pest Control Pricing is an independent research team focused on transparent home services pricing. Our cost guides are based on industry research, contractor surveys, and publicly available data to help you make informed decisions and avoid overpaying.

Talk to a Pest Control Expert

Get a cost estimate and connect with a licensed local exterminator.

(866) 821-0263

No obligation. Licensed and insured professionals.

Call (866) 821-0263