Tiny black flies that drift up from the soil each time a pot gets watered point to fungus gnats. The adults are harmless nuisances, yet their larvae chew on fine roots and multiply fast in damp potting mix.
One female lays up to 200 eggs, and a small problem grows into a cloud within weeks.
The fix starts with a drier pot and ends with habits that stop the next generation.
Table of Contents
What Are Fungus Gnats?

Fungus gnats look like tiny mosquitoes, small dark flies about 1/8 inch long with long legs and gray wings. Adults live about a week and fly weakly, so they hover near the pots. The real damage comes from the larvae, which live in the top inch or two of moist soil and feed on fungi, dead plant matter and tender roots.
Signs You Have Gnats
Small flies that rise from the pot when the soil is disturbed are the most obvious sign. Look closely at the soil surface for tiny, clear larvae with shiny black heads. A slice of raw potato pressed into the soil for a day or two draws larvae to its underside, which makes them easy to spot. Heavy infestations cause yellow leaves, stunted growth and wilted seedlings.
Why Houseplants Attract Them
Potting mixes rich in peat, compost or bark hold moisture and grow the fungi that larvae eat. Indoor pots also dry slowly, especially in winter when light levels drop and plants use less water. A pot watered on a fixed schedule rather than by need sits damp most of the week, an open invitation for egg-laying females.
What Causes Gnats In Houseplants?
Four conditions account for most indoor infestations. Each one boils down to soil that holds moisture and organic matter for too long.
Overwatering And Moist Soil

Constantly damp soil ranks as the top cause of fungus gnats. Females lay their eggs in the moist top layer, and the larvae hatch within a few days. Let the top inch or two of soil dry between waterings. A dry surface stops egg-laying and kills many of the young larvae already present.
Poor Drainage
Pots with no drainage hole trap water at the bottom, and the soil above holds that moisture for days. Decorative cachepots cause the same problem when water collects inside them unnoticed. Repot into a container with a hole, or lift the inner nursery pot after watering and empty the outer one. A gritty mix with perlite or bark drains faster than dense, peat-heavy soil.
Organic Material Build-Up

Fallen leaves, dead flowers and rotten roots on the soil surface feed fungi, and fungi feed gnat larvae. Pick debris off the pot regularly and trim yellow or dying leaves before they drop. Fresh compost and unfinished organic fertilizers attract gnats too, so mix them into outdoor beds rather than houseplant pots.
Reused Or Contaminated Potting Soil
Old potting mix and bags left open outdoors frequently carry eggs or larvae. Use fresh, sealed potting mix for indoor plants. To reuse old soil, bake it in an oven-safe pan at 180 to 200°F for 30 minutes, or microwave moist soil in a covered container for about 90 seconds per two pounds. Let it cool fully before planting.
How To Get Rid Of Gnats On Houseplants Naturally
Natural control has two goals. Dry soil starves the larvae, and traps catch adults before they lay more eggs. Combine the methods below for three to four weeks to cover a full life cycle.
Let Soil Dry Out Between Waterings

This single change clears up many mild infestations. Push a finger into the soil and water only once the top inch or two has dried. Most foliage plants tolerate this schedule well, though ferns and calatheas prefer a lighter touch, such as drying just the top half inch.
Use Sticky Traps
Yellow sticky cards catch adult gnats, which are drawn to the color. Cut the cards into small squares and push them into the soil on a stake, just above the surface. Replace them once they fill up. Traps handle adults only, so pair them with a larval treatment.
Sprinkle Cinnamon Or Sand On Soil

A half-inch layer of coarse sand, fine gravel or horticultural grit over the soil dries fast and blocks females from laying eggs. Ground cinnamon has mild antifungal properties and may slow the fungi that larvae eat, though evidence for its effect on gnats is limited. Dust a thin layer over the surface and reapply after watering.
Apply Neem Oil Solution
Neem oil contains azadirachtin, which disrupts the way insects grow and molt. Mix cold-pressed neem with water and a drop of mild soap according to the label, then pour it through the soil as a drench once a week for three weeks. A neem spray on the soil surface also deters adults. Test a few leaves first, since neem burns some sensitive foliage.
Water With Hydrogen Peroxide Mix

Standard 3% hydrogen peroxide kills larvae on contact. Mix one part peroxide with four parts water and water the plant with it once the top inch of soil has dried. The solution fizzes as it breaks down into water and oxygen, harmless to roots at this strength. Repeat once a week for two to three weeks.
Store-Bought Solutions For Gnats
Commercial products target either flying adults or larvae in the soil, and heavy infestations respond best to one of each.
Gnat Killer Sprays
Sprays with pyrethrins, insecticidal soap or plant oils kill adult gnats on contact. They act fast and provide short-term relief.
Spray the soil surface and the air around the pot according to label directions, and ventilate the room afterward. Sprays have little effect on larvae, so pair them with a soil treatment.
Biological Insecticides (e.g., BTI)

Bacillus thuringiensis israelensis, sold as BTI in products like Mosquito Bits and Gnatrol, kills gnat larvae in the soil. It harms mosquito, gnat and black fly larvae only and poses no risk to people, pets or plants.
Soak about 4 tablespoons of Mosquito Bits in a gallon of water for 30 minutes, strain, and use the liquid for regular watering. Repeat at every watering for three to four weeks.
Gnat-Specific Soil Drenches
Systemic drenches and granules with imidacloprid move into the roots and kill feeding larvae. Check the label for houseplant approval, since many formulas target outdoor use only.
Apply exactly as directed and only after cultural fixes fail. Imidacloprid harms bees and other pollinators, so plants treated with it belong indoors.
How To Prevent Future Gnat Infestations
Prevention comes down to dry topsoil, clean pots and careful plant shopping. These habits stop gnats from returning once an infestation clears.
Choose Well-Draining Soil

A potting mix with perlite, pumice or bark dries faster than straight peat or compost. Add one part perlite to three parts standard mix for most foliage plants. Avoid bags labeled moisture control, which hold extra water. Pots with drainage holes complete the setup.
Avoid Overwatering
Water by need, never by calendar. Check the soil each time and wait until the top inch has dried. Bottom watering helps too. Set the pot in a shallow tray of water for 15 to 20 minutes, let the roots soak up moisture through the drainage hole, then drain. The surface layer dries quickly afterward, which discourages egg-laying.
Quarantine New Plants
New plants from garden centers frequently arrive with gnats in the soil. Set them in a separate room for two to three weeks before moving them next to the rest of the collection. Check the soil with a potato slice or sticky card during that time, and treat with BTI if larvae appear.
Clean Drain Trays And Pots Regularly

Standing water in saucers and cachepots attracts adult gnats and fuels mold. Empty trays within 30 minutes of watering. Scrub old pots with hot, soapy water before reuse, rims and undersides included. A dilute bleach rinse, one part bleach to nine parts water, removes any eggs or fungal residue.