Best Insecticide for Gnats: Plants, Drains & Yards

The right insecticide for gnats depends on which type you’re dealing with and where they are. The tiny flies most people call “gnats” are usually fungus gnats breeding in houseplant soil, drain flies coming from sink pipes, or biting gnats swarming outdoors. Each breeds in a different environment, so each requires a different approach. Killing the adults you see flying around is only half the job; the larvae hidden in soil or organic muck are what keep the population cycling back.

Fungus Gnats in Houseplant Soil

Fungus gnats are the most common indoor gnats. They’re small, dark flies that hover around potted plants because their larvae feed on fungi and organic matter in damp soil. A single generation goes from egg to adult in about 17 days at room temperature: eggs hatch in roughly 3 days, larvae develop over 10 days, and pupae emerge as adults 4 days after that. That fast cycle means a small problem becomes a big one quickly, and it also means you’ll need to treat repeatedly to catch new generations as they hatch.

Soil Drenches for Larvae

The most effective step is killing larvae in the soil before they ever become flying adults. Two options work well here. The first is a microbial insecticide called Bti (a naturally occurring soil bacterium). You mix it with water and pour it directly into the potting mix. Bti is non-toxic to people and pets and targets only the larvae of flies and mosquitoes. The catch is that it doesn’t persist in indoor soil, so you’ll need to reapply roughly every five days until the infestation clears.

The second option is a systemic insecticide that the plant absorbs through its roots. Products containing imidacloprid come as granules, slow-release spikes, or liquid drenches that you work into the soil. As larvae feed in the root zone, they ingest the chemical and die. This approach offers longer-lasting protection than Bti, but it’s a synthetic pesticide, so it’s not ideal if you have curious pets that dig in your pots or if you’re treating edible plants.

Sprays for Adult Gnats

Sprays help knock down the adults you see flying around, but they won’t solve the problem on their own because new adults keep emerging from the soil. Pyrethroid-based sprays containing bifenthrin, cyfluthrin, or permethrin offer extended persistence, meaning they keep killing for days after application. Shorter-acting options like pyrethrin sprays, insecticidal soaps, neem oil, and horticultural oils kill on contact but wear off quickly. You’d need to reapply those every couple of days to see results. For a lasting fix, pair any adult spray with a soil drench.

Beneficial Nematodes

If you’d rather skip chemical insecticides entirely, microscopic beneficial nematodes offer a biological alternative. These are tiny worm-like organisms that you mix with water and pour into the soil. They seek out fungus gnat larvae, enter their bodies, and kill them within one to two days through bacterial infection. The nematodes work best when soil temperatures are between 60 and 70°F, and they can’t survive above 95°F for more than a few hours. Reapply every two weeks until the gnats are gone. When ordering, make sure the product ships with cold packs and store it in the refrigerator until use, since nematodes are living organisms.

Drain Flies in Sinks and Pipes

If the gnats are clustered around kitchen or bathroom drains rather than plants, you’re likely dealing with drain flies (also called moth flies). These fuzzy-winged insects breed in the slimy organic buildup inside pipes. Spraying insecticide around the drain won’t help because the larvae live inside the pipe where spray can’t reach.

The fix is removing the organic film they feed on. Enzyme-based drain gels use concentrated microorganisms to digest food residue, grease, and biofilm clinging to pipe walls. You pour the gel down the drain, let it sit overnight, and repeat for several consecutive nights. Once the breeding material is gone, the flies stop reproducing. A stiff pipe brush can physically scrub away buildup in accessible drains before you apply the gel, speeding things up considerably. Standard chemical drain cleaners can work in a pinch, but enzyme formulas are safer for pipes and more targeted at the biological gunk that attracts flies.

Outdoor Gnats in the Yard

Outdoor gnats, including biting midges and buffalo gnats, breed in moist soil, standing water, or decaying vegetation. For yard-wide control, liquid insecticide concentrates containing bifenthrin are the standard choice. You dilute the concentrate in a pump sprayer and apply it to grass, shrubs, and shaded areas where gnats rest. Bifenthrin leaves a residual layer that continues killing insects for several weeks after application, so you typically only need to treat every few weeks during peak gnat season.

Permethrin is another common active ingredient for outdoor sprays and works similarly. Both are synthetic pyrethroids that disrupt the nervous system of insects on contact. Apply in the early morning or late evening when gnats are most active and wind is calm. Focus on damp, shaded spots near the foundation of your home, around patios, and along fence lines where gnats tend to congregate. Mowing tall grass and eliminating standing water in birdbaths, gutters, and plant saucers reduces breeding sites and makes your chemical treatments more effective.

Safety With Pyrethrin and Pyrethroid Sprays

Pyrethrins (derived from chrysanthemum flowers) and pyrethroids (their synthetic cousins) are the active ingredients in most gnat sprays, both indoor and outdoor. At the concentrations found in household products, they pose low risk to humans. Normal use through breathing indoor air or touching treated surfaces doesn’t introduce enough into your body to cause problems, according to the Agency for Toxic Substances and Disease Registry.

Skin contact with concentrated product can cause temporary numbness, tingling, or a burning sensation that fades within a few hours. Exposure to very large amounts could lead to dizziness, headache, and nausea. A small number of people have allergic reactions to products containing pyrethrins, so if you’ve had sensitivity to chrysanthemums or ragweed, opt for a non-pyrethrin alternative like Bti or nematodes.

Cats are significantly more sensitive to pyrethroids than dogs or humans because they metabolize these compounds slowly. If you have cats, avoid pyrethroid sprays indoors or keep cats out of treated areas until the spray has fully dried. Always follow the label’s instructions on how much to apply and how long to wait before re-entering a treated room.

Matching the Treatment to the Problem

The fastest results come from targeting larvae and adults simultaneously. For fungus gnats in houseplants, a Bti soil drench every five days combined with a pyrethroid spray for flying adults will break the cycle within two to three weeks, roughly the span of one full generation. For drain flies, skip insecticides altogether and focus on enzyme gels and physical cleaning. For outdoor gnats, a bifenthrin or permethrin yard spray every few weeks during warm months keeps populations manageable.

Sticky yellow traps placed near plants or drains won’t eliminate an infestation, but they’re useful for monitoring. If you stop catching gnats on the traps, your treatment is working. If numbers stay high after two to three rounds of treatment, you likely have a moisture or organic matter source you haven’t addressed. Overwatered houseplants, a forgotten drip tray, or a slow pipe leak can sustain a gnat population indefinitely, no matter how much insecticide you apply. Letting the top inch or two of potting soil dry out between waterings is one of the simplest and most effective ways to make your home inhospitable to fungus gnats long term.