Fungus Gnats in Houseplants: Why They Appear and How to Get Rid of Them
Lorin Nielsen December 2, 2026

If small dark flies drift up every time you water a houseplant, you almost certainly have fungus gnats. They are weak fliers, about 2–3 mm long, and they tend to walk across the compost surface or hang around the pot rather than heading for the fruit bowl like fruit flies. The adults do no harm to plants and do not bite. The trouble lives in the compost, where their larvae feed on fungi, decaying matter and, when numbers are high, the fine roots of seedlings and cuttings.
Why they appear
Fungus gnats need constantly moist, organic compost to breed. A plant in a pot that never quite dries out, especially in a cool room in winter when growth slows, is an ideal nursery. They often arrive with a new plant or a bag of potting compost that was stored damp. Overwatering is the common thread in almost every infestation we hear about.
Know the life cycle
Understanding the cycle explains why one spray never solves the problem. A female lays up to a few hundred eggs in the top few centimetres of moist compost. The eggs hatch in a few days into translucent larvae with shiny black heads, which feed for around two weeks. They pupate in the soil and emerge as adults a few days later. The whole cycle takes three to four weeks at room temperature, and adults live about a week. Any treatment has to keep going for at least one full cycle so that new adults emerging from the soil are dealt with too.
A four-step plan
1. Let the compost dry out
This is the most effective step and it costs nothing. Water only when the top 2–3 cm (1 in) of compost is dry to the touch, and empty saucers and decorative outer pots after watering. Most foliage houseplants tolerate this easily, and larvae in the surface layer die when it dries. For plants that like to stay moist, water from below by standing the pot in a tray for twenty minutes, so the surface stays drier.

2. Trap the adults
Yellow sticky traps pushed into the compost or hung just above the leaves catch adults before they can lay more eggs, and they show you how big the problem is. Check them every few days; a falling catch means the plan is working. Indoor and outdoor gnat products differ, so read our comparison of gnat repellents if the flies are also a nuisance on a patio or around garden pots.
3. Treat the larvae
If drying out alone is not enough, target the larvae directly. Products based on Bacillus thuringiensis subsp. israelensis (Bti), sold as mosquito dunks or granules, can be soaked in water and used to water the plants. Bti is a naturally occurring bacterium that is toxic to the larvae of gnats and mosquitoes but harmless to people, pets and plants. Beneficial nematodes (Steinernema feltiae) watered into the compost are another safe biological option. Both need repeating over three or four weeks to cover the full life cycle.
4. Cover or replace the surface
A 1 cm layer of coarse sand, fine gravel or horticultural grit on top of the compost makes it hard for adults to reach moist compost to lay eggs. In a heavy infestation, scrape off the top few centimetres of compost and replace it with fresh, dry mix, or repot completely into a free-draining blend with extra perlite.

Home remedies: what actually works
Cider vinegar traps catch a few adults but do little about the larvae. Diluted hydrogen peroxide drenches (one part 3% peroxide to four parts water) kill larvae on contact and are widely used, but they can also damage fine roots if overused, so test them on one plant first. Cinnamon sprinkled on the surface has a mild antifungal effect but will not clear an established population on its own. None of these replace the most important fix, which is letting the compost dry.
Keeping them away
Store bagged compost sealed and dry, and check new plants before putting them next to your collection; a sticky trap in a newcomer's pot for a week is a cheap early warning. Choose pots with drainage holes, use a free-draining mix, and adjust watering to the season: most houseplants need far less water in winter. Plants that cope with drier compost and lower light are naturally less prone to gnats; our guide to indoor hanging plants for low light lists several easy options. For other pests in and around the house, browse the pest control section.
Quick answers
Can fungus gnats kill a plant? Mature plants rarely suffer more than slower growth, but heavy larval feeding can kill seedlings and unrooted cuttings. Will they spread to other rooms? Adults fly short distances and will move to any pot with wet compost nearby. How long until they are gone? With consistent drying and trapping, most infestations collapse within three to four weeks.






