The best gnat spray for your house depends on which type of gnat you’re dealing with. Fruit flies, fungus gnats from houseplants, and drain flies each breed in different places, so a spray that kills adults on contact won’t solve the problem unless you also target the source. Here’s how to choose the right spray and actually eliminate the infestation.
Identify the Gnat First
Most people use “gnat” as a catch-all, but the tiny flies buzzing around your kitchen or bathroom usually fall into three categories. Fruit flies hover near overripe produce, open bottles, and garbage cans. Fungus gnats cluster around potted plants because their larvae live in moist soil. Drain flies (sometimes called moth flies) breed in the organic gunk lining sink and shower drains.
Each type has a different breeding site, and no spray will permanently fix the problem if the breeding site stays active. A female fruit fly can lay hundreds of eggs on a single piece of rotting fruit. Killing the adults you see is satisfying, but the next generation is already developing out of sight.
Contact Sprays That Kill Adults
For immediate knockdown of flying gnats, pyrethroid-based aerosol sprays are the most common option at hardware stores. Pyrethroids are synthetic versions of pyrethrins, a natural compound extracted from chrysanthemum flowers. They work by disrupting the insect’s nervous system on contact, causing paralysis and death within seconds to minutes. Bifenthrin is one widely available pyrethroid specifically listed for fungus gnat control.
These sprays come in both aerosol cans and pump bottles. For indoor use, look for products explicitly labeled for indoor application. Spray directly at visible gnats or lightly mist areas where they congregate, like around fruit bowls, near windows, or above houseplants. Avoid saturating surfaces where you prepare food.
Aerosol sprays clear a room of adult gnats quickly, but they do nothing to eggs or larvae hidden in soil, drains, or decomposing organic material. Think of them as a temporary fix while you address the actual source.
Homemade Sprays That Work
If you’d rather skip chemical insecticides, two DIY spray recipes handle gnats effectively.
Repellent spray: Mix a cup of water with a tablespoon of vinegar, a few drops of dish soap, and a pinch of baking soda in a spray bottle. Spritz this around problem areas like bathroom counters, near plants, and kitchen windowsills. It won’t kill gnats instantly but discourages them from landing and lingering.
Kill spray: Combine half a cup of water, half a cup of isopropyl (rubbing) alcohol, and a teaspoon of dish soap. Spray this directly onto gnats. The alcohol dehydrates them on contact, and the soap breaks the surface tension of their waxy coating so they can’t fly. This works well for picking off small clusters of gnats near a window or hovering above a fruit bowl. It won’t leave a residual effect, so you’ll need to spray each time you see new ones.
Treating Fungus Gnats in Houseplants
Spraying the air around your plants kills adults but ignores the larvae feeding on organic matter in the soil. The most effective biological treatment is a naturally occurring soil bacterium called Bti, which is toxic to gnat larvae but harmless to plants, pets, and people. You apply it as a soil drench, watering the solution directly into the pot. Once larvae ingest it, they die within a day or two.
The catch: Bti products formulated for fungus gnats (like Gnatrol) are designed for commercial greenhouses and can be hard to find at regular garden centers. Mosquito dunks, which contain the same bacterium, are widely available at hardware stores. You can crumble a piece of a dunk into your watering can, let it soak for several hours, and use that water on your plants.
Between treatments, let the top inch or two of soil dry out completely between waterings. Fungus gnat larvae need consistent moisture to survive. Drying the soil surface breaks their life cycle more reliably than any spray.
Clearing Drain Flies
If gnats seem to emerge from your sink, shower, or bathtub drain, spraying the air won’t help. The breeding ground is the layer of organic buildup coating the inside of your pipes. Enzyme-based drain gels digest this buildup using microorganisms rather than harsh chemicals. The gel formula clings to pipe walls longer than liquid cleaners, giving the enzymes time to break down the sludge where larvae develop. These products contain no insecticides, making them a low-risk option for regular use.
For a quick test, place a strip of clear tape loosely over the drain opening at night, sticky side down. If you find small flies stuck to it in the morning, you’ve confirmed the drain as the source. Clean the drain mechanically with a stiff brush if possible, then follow up with an enzyme gel to prevent re-infestation.
Traps as a Supplement
Sprays and source control work faster when you add a trap to catch stragglers. The simplest version: pour a few tablespoons of apple cider vinegar into a small bowl, add a drop or two of dish soap, and stir in a tablespoon of sugar. The vinegar and sugar attract fruit flies, and the soap breaks the liquid’s surface tension so they sink and drown. Place these near problem spots and replace every few days.
Yellow sticky traps work well for fungus gnats. Stick them into the soil of houseplants or place them on the windowsill. They won’t eliminate an infestation alone, but they’ll reduce the adult population and give you a visual gauge of how bad the problem is.
Safety Around Pets and Children
Pyrethroid sprays require caution indoors, especially with cats. Cats lack certain liver enzymes that break down pyrethroids efficiently, making them more vulnerable to toxicity than dogs. During any indoor spray application, remove pets from the room and keep them out until surfaces are dry and the area is well ventilated. Cover fish tanks completely, including the air pump intake, since aerosolized pesticides can dissolve into tank water.
Turn off central air conditioning or heating while spraying. Forced air systems circulate aerosolized pesticides into every room, including spaces you didn’t intend to treat. Open windows in the treated room and let it air out for at least the time specified on the product label before allowing pets or children back in.
The DIY sprays (vinegar, dish soap, rubbing alcohol) are far less concerning around pets, though you should still avoid spraying rubbing alcohol near animals or letting them walk through wet surfaces before the alcohol evaporates.
Why Spraying Alone Doesn’t Work
The most common reason people keep battling gnats week after week is relying entirely on killing the adults they can see. A single fruit fly lays eggs that hatch within a day or two, and larvae can mature into new adults in about a week under warm indoor conditions. If the rotting banana in the trash, the overwatered pothos on the shelf, or the gunky shower drain stays untouched, you’ll be spraying indefinitely.
The fastest path to a gnat-free house is a three-step approach: remove or clean the breeding source, use a targeted spray or biological treatment to kill existing adults and larvae, and set out a trap to catch the remaining stragglers. Most infestations clear up within one to two weeks once you cut off the source.