How to Get Rid of House Fungus Gnats for Good

Fungus gnats are tiny flying insects that breed in the moist soil of houseplants. They’re one of the most common indoor plant pests, and if you’re seeing small dark flies hovering around your potted plants or windowsills, they’re almost certainly what you’re dealing with. The adults are mostly a nuisance, but their larvae feed on organic matter in soil and can damage plant roots, especially in young or delicate plants.

What Fungus Gnats Look Like

Adult fungus gnats are small, dark-bodied flies about 1/8 inch long with long legs and long antennae. They look similar to tiny mosquitoes. You’ll usually spot them flying weakly around the soil surface of houseplants, near windows, or resting on walls and ceilings near your plants. They’re attracted to light, which is why they often end up on windowpanes.

People commonly confuse them with fruit flies or drain flies. Fruit flies are rounder, brownish-tan, and hover around ripening fruit or kitchen drains. Fungus gnats are darker, slimmer, and almost always found near potted plants or soil. If you disturb the soil in a pot and a cloud of tiny flies rises up, those are fungus gnats.

Why They Show Up in Your Home

Fungus gnats thrive in one specific condition: moist organic matter. Female gnats lay tiny eggs directly in damp potting soil, and when those eggs hatch, the larvae feed on fungi, decaying plant material, and fine root hairs in the soil. The wetter you keep your houseplants, the more hospitable you make the environment for breeding.

The most common triggers include overwatering houseplants, using pots without drainage holes, and potting mixes that retain too much moisture. Organic soil amendments like blood meal, manure, or incompletely composted material are particularly attractive to egg-laying females. Decomposing grass clippings, compost, and organic mulches also serve as breeding spots. New bags of potting soil can come pre-infested if the organic matter inside wasn’t fully pasteurized before packaging.

How They Affect Your Plants

The flying adults don’t bite, don’t spread disease to humans, and don’t directly harm plants. They’re just annoying. The real concern is underground: the larvae live in the top few inches of soil and feed on root hairs and organic debris. In a mild infestation, most established houseplants handle this without visible damage.

Heavy infestations are a different story. Seedlings, cuttings, and young plants with small root systems are vulnerable. You may notice wilting, yellowing leaves, or stunted growth that doesn’t improve with watering. Larval feeding can also create entry points for soil-borne fungal pathogens, compounding the damage. If a plant looks like it’s declining despite proper watering, fungus gnat larvae chewing through roots could be contributing.

How to Get Rid of Fungus Gnats

Let the Soil Dry Out

This is the single most effective step. Allow the top inch or two of soil to dry completely between waterings. Fungus gnat eggs and young larvae need consistent moisture to survive, and drying the surface layer kills them or makes the soil inhospitable for new eggs. Most houseplants tolerate this drying cycle well, and many actually prefer it. If you tend to water on a schedule rather than checking soil moisture, switch to checking with your finger before reaching for the watering can.

Improve Drainage

Amend your potting mix so it doesn’t stay soggy. Adding perlite or coarse sand increases drainage and helps the top layer dry faster. Make sure every pot has drainage holes, and don’t let pots sit in saucers of standing water. When repotting, use only pasteurized potting mix. Avoid bags labeled as “moisture control” or heavy organic blends for plants that are already attracting gnats.

Use Yellow Sticky Traps

Small yellow sticky cards placed near the soil surface or stuck into the pot will catch adult gnats before they can lay more eggs. These won’t eliminate an infestation on their own since they don’t touch the larvae in the soil, but they reduce the breeding population and give you a visual gauge of how bad the problem is. If the traps are covered in gnats within a day, you know the infestation is significant.

Hydrogen Peroxide Soil Drench

A mild hydrogen peroxide solution kills larvae on contact without harming plant roots. Mix one part standard 3% hydrogen peroxide with four parts water and pour it through the soil as you would a normal watering. The mixture will fizz as it works through the soil, which is normal. This kills larvae in the soil at the time of application but doesn’t prevent new eggs, so you may need to repeat it once or twice over the course of a week or two.

Beneficial Nematodes

For persistent or large-scale infestations, microscopic beneficial nematodes are one of the most effective biological controls. These are living organisms you mix into water and apply to the soil, where they seek out and kill gnat larvae. They’re effective in soil temperatures between 55°F and 85°F, which covers most indoor environments. After applying, keep the soil moist (not waterlogged) for at least two weeks so the nematodes can move through the soil and do their work. You can find them online or at well-stocked garden centers, usually sold as a powder or gel that you rehydrate before application.

Top-Dressing With Sand or Gravel

Adding a half-inch layer of coarse sand, decorative gravel, or diatomaceous earth on top of the potting soil creates a physical barrier. Female gnats need to reach moist organic soil to lay eggs, and a dry mineral layer on top discourages them. This works best as a preventive measure or combined with other methods, since it won’t kill larvae already living deeper in the soil.

Preventing Them From Coming Back

Fungus gnats return for the same reason they showed up: wet soil full of organic matter. The long-term fix is changing your watering habits. Water less frequently, water thoroughly when you do (so you’re not doing frequent light waterings that keep the surface perpetually damp), and ensure good drainage in every pot. Bottom watering, where you place the pot in a tray of water and let the soil wick moisture upward, keeps the top layer drier and makes it less attractive to egg-laying adults.

When bringing new plants home, inspect them carefully. Quarantine new additions for a week or two if possible, and check the soil surface for tiny flies. Avoid using incompletely composted organic matter in your potting mixes, and skip heavy applications of organic fertilizers like blood meal or manure indoors. Store open bags of potting soil in sealed containers so they don’t become breeding grounds in your garage or closet.

Fungus gnats reproduce quickly in favorable conditions, so a small population can become a noticeable infestation within a couple of weeks. The flip side is that removing their preferred conditions, consistently moist organic soil, collapses the population just as fast. Most people see a dramatic reduction within two to three weeks of letting their soil dry out and using traps or a hydrogen peroxide drench to knock back the existing population.