How to get rid of gnats
To get rid of gnats, find where they breed: fungus gnats around houseplants stop when you let the soil dry out, fruit flies stop when ripe produce and trash are removed, and drain flies stop when the drain is scrubbed.
Which gnat do you have
"Gnat" is what most people call any tiny fly in the house. Three different insects account for nearly all indoor gnat problems, and each one breeds in a different place. Spraying the air doesn't help with any of them; removing the breeding site does.
| Fungus gnat | Fruit fly | Drain fly | |
|---|---|---|---|
| Size | 1/16–1/8 in | About 1/8 in | About 1/8 in |
| Look | Dark, slender, long legs and antennae, like a tiny mosquito | Tan to brown body, usually red eyes | Fuzzy, gray, moth-like wings held roof-like |
| Flight | Weak; walks and hops on soil | Hovers around food | Short hops from wall to wall |
| Found | Houseplant soil, windows near plants | Fruit bowl, trash, recycling, drains | Bathroom walls near sinks and tubs |
| Breeds in | Wet potting mix, rich in organic matter | Ripe or fermenting produce, moist residue | Slime film inside drains |
Fungus gnats
Fungus gnats are delicate, dark flies 1/16 to 1/8 inch long, with long legs and antennae. Many common species have a Y-shaped vein in their clear to light gray wings. Adults rest on the soil, leaves and nearby windows and walls. The larvae live in damp potting mix. They are legless and elongated, clear to whitish, with a shiny black head. At 75°F a generation takes about 17 days, so numbers build fast in overwatered pots.
Adults don't bite or harm plants. When larvae are numerous, their feeding on roots can stunt seedlings and young plants. Wilting in older plants is more often a watering or root rot problem than a gnat problem.
To get rid of fungus gnats:
- Let the top of the soil dry out between waterings. This is the single most effective step.
- Empty water from saucers and cachepots, and improve drainage by adding perlite or coarse sand when you repot.
- Find the worst pots by pressing slices of raw potato, cut side down, into the soil. Check them after a few days for larvae.
- Hang yellow sticky cards near plants to catch adults and track numbers.
- Use a Bti (Bacillus thuringiensis israelensis) product labeled for fungus gnats as a soil drench to kill larvae; repeat about every 5 days because it breaks down quickly. Beneficial nematodes (Steinernema feltiae) applied to moist soil give longer control.
- Repot with fresh, pasteurized potting mix, and avoid partly composted material. Throw out heavily infested plants rather than moving them to new pots.
Insecticides are rarely needed indoors.
Fruit flies
Fruit flies are about 1/8 inch long, yellowish to brown, and usually have red eyes. They lay eggs in moist, fermenting material: overripe fruit and vegetables, spills in recycling bins, garbage disposals, drains and trash cans. The fix is to remove the source.
- Eat, refrigerate or throw out ripe produce.
- Rinse recycling, empty trash often, and clean under and behind the trash can.
- Clean drains and the disposal splash guard.
- Trap the remaining adults in a jar with a few ounces of cider vinegar and a paper funnel in the top. Clean the trap weekly and refill.
Drain flies
If the tiny flies are fuzzy and sit on bathroom walls, they are drain flies breeding in the slime inside a drain. Bleach and boiling water won't fix it; scrubbing the drain will. See the drain flies page.
Where in the US
Fungus gnats, fruit flies and drain flies are found indoors across the US in any season. Indoors, their numbers depend less on region than on what is in the house: wet potting mix for fungus gnats, ripe produce and trash for fruit flies, and slimy drains for drain flies.
Photos
Often mistaken for

Photo: Jesse Rorabaugh via iNaturalist, CC0 1.0 (public domain dedication)
Fruit fly
About 3 mm, tan body, usually red eyes
Tan with red eyes; found around fruit, trash and recycling, not plant soil.

Photo: eebee via iNaturalist, CC BY 4.0
Drain fly
2–4 mm, fuzzy, moth-like wings held roof-like
Fuzzy, moth-like wings held like a roof; rests on bathroom walls near drains.
Choose a treatment
Fungus gnats are a watering problem first; only add treatments when drying the soil isn't enough.
Let the soil dry out
Do it yourself
- Let the top of the soil dry between waterings, and empty water from saucers.
- Hang a yellow sticky card at soil level to catch adults and see if numbers fall.
- Press raw potato slices into the soil, cut side down, to check for larvae after a few days.
Professional
Not needed.
Dry out, drench with Bti
Do it yourself
- Keep watering to a minimum and improve drainage; add perlite or coarse sand when you repot.
- Drench the soil with a Bti (Bacillus thuringiensis israelensis) product labeled for fungus gnats; repeat about every 5 days, since it breaks down quickly indoors. Read and follow the label.
- Or apply beneficial nematodes (Steinernema feltiae) to moist soil for longer control.
- Keep yellow sticky cards up to track adults.
Professional
Rarely needed. A garden center or extension office can confirm the ID if the flies don't match fungus gnats.
Repot, then recheck the ID
Do it yourself
- Repot in fresh, pasteurized potting mix, and avoid partly composted material.
- Throw out heavily infested plants instead of moving them to new pots.
- If flies are in the kitchen or bathroom away from plants, check for fruit flies (ripe produce, trash, recycling) or drain flies (fuzzy flies near drains).
- Insecticides are rarely needed indoors; if you use one, use a product labeled for indoor plants and follow the label.
Professional
If no plant, fruit or drain source explains the flies, a pest professional or plumber can look for hidden moisture such as a leak inside a wall or under a floor.
Bti and nematodes are biological products. Sticky cards trap pet hair and small fingers, so hang them out of reach.
Tiny flies around the fruit bowl or trash are usually fruit flies, not fungus gnats. Remove ripe produce and set a cider vinegar trap with a paper funnel.
When to call a professional
Gnats rarely need a professional. Call one if you've removed every plant, fruit and drain source and flies keep appearing, especially near floors or walls, since that can mean a hidden leak, broken drain line or other wet organic material in a wall or under a slab. Commercial kitchens and greenhouses benefit from a professional inspection.
Questions
What is the fastest way to get rid of gnats?
Remove where they breed. For fungus gnats, let the soil dry between waterings and drench with a Bti product; for fruit flies, get rid of ripe produce and set a cider vinegar trap; for drain flies, scrub the drain.
How do I tell fungus gnats from fruit flies?
Fungus gnats are dark and slender like tiny mosquitoes and hang around plant soil. Fruit flies are tan with red eyes and gather on fruit and trash.
Do gnats bite?
Fungus gnats, fruit flies and drain flies don't bite. If small flies are biting you, they are something else; see what bit me.
Will fungus gnats kill my plants?
Usually not. Larvae can damage roots of seedlings and young plants when numbers are high, but adults don't harm plants.