You get rid of gnats by killing the larvae in wet organic matter, not by swatting the adults circling your head. Adult fungus gnats live roughly one week, but a single female can lay around 200 eggs in damp potting soil, so any plan that skips the breeding site will fail within days. The method below works for fungus gnats, drain flies, and fruit flies because it attacks moisture, organic film, and overwatering β€” the three conditions every indoor gnat outbreak needs.

Most people spray the air, see fewer flies for a day, and assume the problem is solved. It isn't. The adults you see are the visible 10 percent of the population; the eggs, larvae, and pupae sitting in soil and drain slime are the other 90 percent, and they keep emerging for two to three weeks after the last spray. The plan here is sequenced in the order that actually stops the cycle: identify the species, kill the larvae, break the moisture source, then trap the survivors.

Identify Which Gnat You Have Before Buying Anything

Fungus gnats, drain flies, and fruit flies look similar at arm's length but need different treatments, and misidentifying the species is the most common reason a treatment fails. Fungus gnats are small, dark, mosquito-like insects that walk across soil and fly weakly around potted plants. Drain flies are fuzzy, moth-like, and rest on bathroom walls near drains. Fruit flies are tan with red eyes and hover around ripening produce and recycling bins.

Where the insects rest tells you the species faster than their appearance. Hold still for a minute in the affected room and watch landing patterns. Gnats clustering on the soil surface of a fern are fungus gnats. Insects rising from a shower drain when you run hot water are drain flies. Flies circling a fruit bowl or a half-empty beer bottle are fruit flies. Each has a different larval food source, so the fix differs.

The breeding medium is the deciding factor. Fungus gnat larvae feed on fungi and decaying root tissue in consistently damp potting mix. Drain fly larvae graze on the gelatinous organic film coating the inside of drain pipes. Fruit fly larvae develop in fermenting fruit, spilled juice, and residue in recycling containers. According to university extension entomology guidance, fungus gnats rarely travel more than a few feet from their breeding soil, which is why an infestation concentrates around specific pots rather than spreading evenly through a house.

Check before you buy sticky traps or nematodes. A five-minute inspection β€” lifting a pot to look for moisture rings, shining a flashlight into a drain, checking the bottom of the recycling bin β€” tells you which of the three treatments below actually applies. Buying fungus gnat nematodes for a drain fly problem wastes money and two weeks.

Count How Many Plants You Have, Because It Sets Your Treatment Cost

The size of your plant collection determines both the cost and the time your eradication takes, and it's the number most guides skip. A single affected houseplant needs about 15 minutes of treatment and roughly $10–20 in supplies. A collection of 20 pots where six show activity needs the same supplies but three to four hours of labor across repeated applications, because every pot with damp soil is a potential nursery even if you haven't seen flies there yet.

Treat the whole collection, not just the pot with visible flies. Fungus gnats move between adjacent pots, and larvae can survive in soil that looks dry on the surface while staying moist two inches down. If you own fewer than five plants, treat all of them at once and you'll typically break the cycle in one application round. Above ten plants, plan on two rounds spaced seven to ten days apart to catch newly hatched larvae.

Budget the supplies by plant count. Yellow sticky traps come in packs of 20 or more, and you need one or two per pot for meaningful adult capture. Biological larvicides like Bacillus thuringiensis israelensis (Bti) dunks are sold as mosquito-control products and are dosed by water volume, so a single dunk can treat several gallons of watering solution. One $8–12 package of Bti dunks typically covers a 20-plant collection for a month of waterings; confirm current pricing and dosing on the maker's label, since formulations vary.

Time the treatment to your watering schedule. The most effective moment to apply a larvicide is the next scheduled watering, not immediately, because you want the treated water to soak into the top two inches of soil where larvae feed. If your plants are due for water in three days, buy supplies now and apply then. That sequencing saves you a full week of repeat applications.

Stop Overwatering First, Then Treat the Soil

The fastest way to reduce a fungus gnat population is to let the top inch of soil dry out between waterings, because larvae need constant moisture to survive and adults won't lay eggs in dry medium. Most houseplant gnat infestations trace to a watering habit that keeps the surface permanently damp β€” often the result of watering on a fixed weekly schedule rather than checking soil moisture first. Change that habit before you apply any product.

Check moisture with a finger or a cheap moisture meter before every watering. Push a finger two inches into the soil; if it feels cool and damp, wait. Most tropical houseplants tolerate the top inch drying out, though ferns, calatheas, and seedlings are exceptions and need a gentler approach using bottom watering. Bottom watering β€” setting the pot in a tray of water for 20 minutes and then draining it β€” keeps the soil surface dry while the roots still get moisture.

Improve drainage and airflow at the same time. Ensure every pot has a drainage hole and that saucers don't hold standing water for more than an hour after watering. A small fan running on low near your plants increases surface evaporation and makes the top layer less hospitable to egg-laying adults. According to extension guidance from several US university horticulture programs, improving airflow and letting soil dry between waterings reduces fungus gnat reproduction more reliably than any single insecticide.

For plants that genuinely need consistently moist soil, top-dress the surface with a half-inch layer of coarse sand, perlite, or gravel. This physical barrier keeps adults from reaching the soil to lay eggs and dries out quickly after watering. It's the one intervention that works on moisture-loving plants without risking them.

Apply a Biological Larvicide the Way It's Actually Labeled

Bacillus thuringiensis israelensis, sold as mosquito dunks or bits, kills fungus gnat larvae in the soil without harming plants, pets, or people when used as directed. It works because the bacteria produce proteins that are toxic to fly larvae that ingest them but harmless to mammals. The critical detail most guides skip: Bti must be applied to the soil as a drench so larvae eat it, not sprayed on foliage or left sitting in a watering can.

Soak a dunk in a gallon of water for at least 30 minutes, or overnight if you have time, then use that water to water your plants. Alternatively, crumble a quarter of a mosquito dunk into the top inch of soil per pot and water normally. Reapply every seven to ten days for three rounds, because Bti breaks down in soil and doesn't persist long enough to catch a second generation.

Follow the label rate rather than improvising a "stronger" dose. Overdosing doesn't kill larvae faster and can leave residue that affects soil biology. The label on most Bti dunk products gives a rate per gallon or per square foot of surface, and for houseplants the practical version is one-quarter dunk per 6-inch pot or a soak solution applied at normal watering volume. Confirm the exact rate on your specific product's label, since concentrations differ between brands.

Pair Bti with yellow sticky traps to catch adults and measure progress. Traps don't control an infestation alone, but they give you a read on whether the population is dropping. If you're still catching more than a dozen adults per trap per week after two Bti applications, you have an untreated breeding site β€” usually a pot you skipped, a drip tray, or a plant in another room. Reapply and re-inspect rather than adding a second chemical.

Trap Adults With Yellow Sticks β€” and Read the Count

Yellow sticky traps catch adult fungus gnats, drain flies, and fruit flies because the insects are attracted to yellow wavelengths, and the count on each trap tells you whether your larval treatment is working. Place one trap per pot, stuck into the soil at an angle or laid flat on the surface, and replace them weekly. The traps are inexpensive, chemical-free, and the single most useful monitoring tool in this process.

Use the trap count as a trend line, not a target. In the first week of treatment, expect high catches as existing adults emerge. By week two, catches should drop noticeably. By week three, a trap catching fewer than five adults per week usually indicates the cycle is broken. Don't judge success by day-two counts; larvae already in the soil will keep hatching for up to two weeks regardless of what you do.

Don't rely on traps as the only control. A widely repeated claim is that sticky traps alone will eliminate a gnat problem, but adults lay eggs faster than traps catch them, so the population keeps replenishing unless the breeding site is treated. Traps reduce adults and give you data; they don't stop reproduction. Treat that as a monitoring layer, not the fix.

Mount traps where adults actually fly. Fungus gnats hover low, near soil and pot rims. Drain flies rest on walls near drains and fly in short zigzags. Fruit flies circle upward around fruit and bins. Putting a trap on a high shelf for a soil infestation catches almost nothing. Place traps at the level where you see the insects, and move them if the catch stays near zero.

Clear Drains the Right Way for Drain Flies

Drain flies need a different treatment than fungus gnats because their larvae live in the organic film inside pipes, not in soil. Pouring bleach down a drain kills some larvae but leaves the film intact, and the film is the food source. The effective method is mechanical: scour the pipe walls to remove the film, then treat the drain biologically or with an appropriate drain cleaner labeled for organic buildup.

Start with a stiff drain brush and hot water. Remove the stopper or strainer, brush the visible inside of the drain, and flush with hot water for a minute. This removes the slime layer where larvae feed and where adults lay eggs. Repeat weekly for three weeks, because a single brushing leaves enough film behind for the population to recover. For pop-up sink stoppers, unscrew and clean the stopper itself β€” it's a common hidden breeding site.

Use a biological drain treatment containing enzymes or bacteria that digest organic film, following the label's dosing and frequency. These products work slowly and need repeated application, so plan on several weeks. Avoid combining them with bleach on the same day, since bleach kills the bacteria you just added. If the drain is slow, fix the clog first β€” standing water in a trap or pipe section gives drain flies a perfect nursery.

Find the overflow and hidden wet spots. Bathroom sink overflows, the gap around a loose toilet base, shower drain covers, and the rubber gasket in a garbage disposal can all harbor drain fly larvae. Shine a flashlight into these areas after running water and look for small worm-like larvae or dark film. Treating only the main drain while ignoring an overflow leaves a breeding site untouched, and the flies return within a week.

Handle Fruit Flies With a Fridge-and-Bin Audit

Fruit flies breed in fermenting organic matter, so the fix is removing every fermentation source from the room, not just the obvious fruit bowl. Overripe bananas, onions past their prime, potatoes sprouting in a bag, spilled juice under the fridge, and the residue in a recycling bin all support larvae. According to guidance from university extension programs, fruit flies can complete a generation in about a week in warm indoor conditions, so a missed source repopulates your kitchen fast.

Do a full audit of the kitchen before setting traps. Refrigerate or discard ripe and overripe produce. Rinse bottles and cans before recycling. Wipe under appliances and inside cabinets where spills hide. Empty and wash the compost container, and check that its lid seals. Pull the fridge out if you can and check the drip tray underneath, which is a classic overlooked breeding site.

Set a simple vinegar trap for the adults you can't catch by hand. Pour an inch of apple cider vinegar into a small bowl or jar, add a drop of dish soap to break surface tension, and place it near the source. Cover with plastic wrap poked with a few fork holes if you prefer, though an open bowl works for most kitchens. Refresh the trap every few days; it catches adults but won't touch larvae in a hidden source.

Expect two weeks to full clearance, not two days. Adults live about a month and lay eggs continuously, so even after you remove every source, flies already in the adult stage will die off over two to four weeks. Keep the trap out, keep the kitchen audit going, and recheck the bin and produce areas weekly. If flies persist past three weeks, you still have an undiscovered breeding site β€” usually the recycling bin, a floor drain, or a forgotten bag of produce.

Cost, Time, and When to Call a Professional

Most indoor gnat problems resolve for $20–50 in supplies and two to four weeks of consistent effort, and knowing when that's not enough saves you months of frustration. The table below compares the three common infestations on the dimensions that matter for a homeowner deciding what to buy and how long to commit.

Infestation type Breeding site Primary treatment Realistic clearance time Typical supply cost
Fungus gnats Damp potting soil Bti drench, sticky traps, dry-down 2–3 weeks $15–30
Drain flies Organic film in pipes Mechanical brushing, enzyme treatment 3–4 weeks $15–40
Fruit flies Fermenting produce, bins Source removal, vinegar trap 2–4 weeks $5–15

Supplies stay cheap; labor is the real cost. A 20-plant collection with six affected pots needs three Bti applications, weekly trap swaps, and a watering-habit change β€” roughly four to six hours across three weeks. Compare that to a professional pest control visit, which for a small indoor gnat issue typically runs $100–250 depending on region and provider, and may require a follow-up. Pricing varies by market and by the company, so get a written quote for anything above a single visit.

Call a professional if you've followed the species-specific treatment for four weeks with no decline in trap counts, if the infestation recurs within a week of every treatment, or if you can't find the breeding site. A persistent recurrence usually means a hidden moisture source β€” a leak under a sink, a slow drain, a plant in a decorative pot with no drainage β€” that no product will fix. Plumbers find leaks; pest control handles structural infestations like a sewer line break that feeds drain flies.

Treat the whole-home picture once, not room by room forever. Gnats in one room are usually a local moisture problem, but gnats across multiple rooms point to a building-wide humidity issue, an HVAC condensate line, or an overlooked water leak. Fixing humidity and airflow at the home level β€” running bathroom fans, fixing drips, keeping indoor humidity below roughly 60 percent where practical β€” prevents the next outbreak rather than just ending this one.

FAQ

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

Expect two to four weeks for full clearance even with correct treatment. Adults live about a week to a month depending on species, and larvae already in soil or drain film keep hatching for one to two weeks after you start. Trap counts falling week over week is the real signal, not zero flies on day three. If you're still catching high numbers after four weeks, a breeding site is untreated.

Do I need to repot my plants to get rid of fungus gnats?

Usually not. Bti drenches and drying out the top inch of soil kill larvae without repotting, and repotting stresses plants. Repot only if the soil stays soggy despite reduced watering, if the pot has no drainage hole, or if root rot is already present. When you do repot, use fresh potting mix and a pot with drainage, and top-dress with coarse sand to prevent recolonization.

Why do gnats keep coming back after I treat them?

Recurrence means an untreated breeding site, not treatment failure. The most common culprits are one skipped plant, a drip tray holding water, a floor drain, a recycling bin, or a hidden leak. According to extension entomology guidance, fungus gnats stay within a few feet of their breeding soil, so a returning population usually points to a nearby pot you didn't treat. Re-inspect every moisture source before buying more product.

Are gnat traps and sprays from the hardware store enough on their own?

No. Adult traps and contact sprays reduce visible flies but don't touch larvae, so the population rebounds within a week. A $10–20 supply kit that includes a larvicide like Bti plus sticky traps addresses both stages and costs less than repeated spray purchases. For drain flies, no spray replaces brushing the pipe film, because the film is the food source.

Are fungus gnats harmful to my plants or my family?

Fungus gnat adults are nuisance insects and don't bite people, and larvae usually feed on fungi and dead root tissue rather than healthy roots. In large numbers, larvae can damage seedlings and stressed plants, and the damp conditions that support them can promote root rot. They aren't a medical threat; if you have a persistent infestation and plant decline together, a local horticulturist or extension office can help diagnose the underlying cause.

What's the difference between a gnat and a fruit fly?

Fungus gnats are dark, weak fliers that stay near soil; fruit flies are tan with red eyes and hover around ripe produce and bins. Drain flies are fuzzy and moth-like, resting on bathroom walls near drains. The species matters because the treatment differs β€” soil drench for fungus gnats, drain brushing for drain flies, source removal for fruit flies. Look at where they rest before buying anything.

Can I use vinegar traps for fungus gnats too?

Vinegar traps catch fruit flies well and fungus gnats poorly. Fungus gnats aren't strongly attracted to fermenting vinegar, so a vinegar bowl in a plant room usually catches a handful while the soil population keeps reproducing. Use yellow sticky traps for fungus gnats and reserve vinegar traps for kitchens with fruit flies. Matching the trap to the species is why identification comes first.

This article is general educational information about household pest management and is not a diagnosis, treatment plan, or professional pest-control recommendation. Product labels and local regulations vary, so follow the manufacturer's directions and confirm rates on the label. If an infestation persists or you suspect a leak, mold, or structural problem, consult a qualified local pest-control professional or plumber; for health concerns related to mold or indoor air quality, contact a qualified local health professional.