Quick answer: To get rid of fungus gnats, stop overwatering: let the top 1 to 2 inches of potting soil dry out between waterings, water from the bottom and empty saucers. Put yellow sticky traps at soil level to catch adults, and treat the larvae in the soil with Bti (the bacteria in products like Mosquito Bits) for a few weeks. Most plants are gnat-free within three to four weeks.
If you’re wondering how to get rid of fungus gnats, you’ve likely seen tiny black flies drifting up from your houseplants every time you water. They’re annoying, they multiply quickly, and swatting them does nothing because the real problem is in the soil.
The good news is that fungus gnats are one of the easiest household pests to beat once you target the larvae. This guide is based on guidance from university extension horticulturists and entomologists, and it works for a single plant or a whole collection.
What are fungus gnats?
Fungus gnats are small, dark gray to black flies, about one-eighth of an inch long, with long legs and long antennae. They look like tiny mosquitoes but don’t bite. They’re weak fliers, so you usually see them walking on the soil or flying in short, zigzag bursts near plants and windows.
They’re often mistaken for fruit flies. Fruit flies are tan with red eyes and hang around the fruit bowl and trash. If your tiny flies are near the sink or bathroom walls and look fuzzy, you may have drain flies instead. Our guide on how to get rid of gnats in the house helps you tell them apart.
What causes fungus gnats?
Fungus gnats lay their eggs in the top layer of moist potting soil. The larvae, tiny clear worms with shiny black heads, feed on fungi, decaying organic matter and sometimes fine plant roots. In warm homes the full cycle from egg to adult takes about three to four weeks, and each female can lay a hundred or more eggs.
The biggest cause is simple: soil that stays wet. Other triggers include:
- Watering on a schedule instead of when the soil is dry
- Pots without drainage holes, or saucers full of standing water
- Peat-heavy or bark-rich potting mixes that stay damp a long time
- Opened bags of potting mix stored outside or in a damp garage, where gnats can lay eggs before you ever pot
- Decaying leaves on the soil surface
- Low light and cool rooms, where soil dries slowly
Quick test: lay a slice of raw potato on the soil for two or three days, then lift it. Tiny larvae clustered underneath confirm fungus gnats and show you which pots are infested.
Are fungus gnats harmful to plants?
Adults are mostly a nuisance. The larvae can feed on root hairs, and in big numbers they can stunt or wilt seedlings, cuttings and young plants. Established houseplants usually tolerate them, but it’s still worth acting quickly because the population builds with every watering.
How to get rid of fungus gnats: step by step
- Let the soil dry out. Stop watering until the top 1 to 2 inches feel dry to your finger. Larvae need moist soil to survive, and many eggs and young larvae die when the top layer dries. This alone solves many mild cases.
- Switch to bottom watering. Set the pot in a tray of water for 15 to 30 minutes so the roots drink from below and the surface stays drier. Pour off any water left in the saucer afterward.
- Set yellow sticky traps. Lay a yellow sticky card flat on the soil or stake it just above the surface. Adults are drawn to the color and get stuck, which stops them from laying more eggs. The cards also show you which pots are the worst.
- Treat the larvae with Bti. Bti (Bacillus thuringiensis israelensis) is a naturally occurring bacterium that kills fly larvae, including fungus gnat and mosquito larvae. A common method: soak mosquito dunk or granule products in water for about 30 minutes, then use that water on your plants. Repeat each time you water for about three to four weeks to cover the full life cycle. Follow the product label.
- Try a hydrogen peroxide drench for heavy cases. Many gardeners water with regular 3% hydrogen peroxide diluted with about four parts water. It fizzes on contact and kills larvae in the top of the soil. Test on one plant first, since strong solutions can harm sensitive roots, and don’t use it more often than needed.
- Remove debris and top the soil. Pick dead leaves off the soil. Then add a half-inch layer of coarse sand or fine gravel over the surface. It dries fast and makes it harder for adults to reach the soil to lay eggs.
- Repot badly infested plants. If a plant is waterlogged or larvae are everywhere, gently remove the old soil and repot in fresh, bagged potting mix in a pot with drainage holes. Toss the old soil outdoors in a sealed bag.
- Keep going for three to four weeks. Adults live about a week, but eggs and larvae already in the soil keep emerging. Keep traps up and treat until sticky cards stay clean for two weeks.
Follow the label on any Bti, insecticide or houseplant pest product, and keep products and treated water out of reach of children and pets. Hydrogen peroxide stronger than 3% can burn skin and eyes and damage plants: only use the regular drugstore strength, diluted, and wear gloves. Keep sticky traps away from pets and curious hands. If you use an indoor insecticide made for houseplants, apply it in a ventilated area and only on the plants listed on the label.
Do home remedies for fungus gnats work?
Some do, some don’t. Here’s the honest rundown:
- Apple cider vinegar traps: great for fruit flies, weak for fungus gnats, which aren’t strongly drawn to vinegar.
- Cinnamon on the soil: it may slow some fungal growth, but there’s little evidence it controls gnats.
- Neem oil drench: can help reduce larvae in some cases, but results vary and some plants are sensitive. Follow the label.
- Beneficial nematodes and predatory mites: Steinernema feltiae nematodes and soil-dwelling predatory mites are proven biological controls used by greenhouse growers, and both are sold for home use.
- Bug zappers and sprays in the air: they kill some adults but do nothing about larvae in the soil.
The equipment that helps
You’ll get the best results by pairing traps for adults with a soil treatment for larvae. Bti products are sold in garden centers as mosquito dunks or bits; look for Bti as the active ingredient. For more trap choices, see our guide to the best fruit fly trap, which covers gnat traps too.
Best for houseplants
Yellow Sticky Traps for Fungus Gnats (36-Pack)
Best for: catching adult fungus gnats right at the soil and finding which pots are infested.
Why we picked it
- Bright yellow cards attract fungus gnats and other small fliers
- Stake into pots or lay flat on the soil
- Big pack lasts through a full three- to four-week treatment
Keep in mind
- Catch adults only; you still need to dry the soil and treat larvae
- Very sticky; keep away from pets, hair and leaves
Best room trap
Zevo Plug-In Flying Insect Trap (1 Base + 3 Refills)
Best for: rooms with lots of plants, where gnats fly around windows and lamps.
Why we picked it
- Blue and UV light catches fungus gnats, fruit flies and drain flies
- Hidden glue cartridge, no sprays
- Works day and night without checking each pot
Keep in mind
- Needs an outlet near the plants, ideally low
- Doesn’t reach larvae in the soil
How to keep fungus gnats from coming back
- Water only when the top inch or two is dry. Check with your finger instead of following a calendar.
- Use pots with drainage holes and empty saucers 30 minutes after watering.
- Choose a fast-draining mix. Adding perlite helps the soil dry faster.
- Store potting mix sealed and indoors, and use it within a season.
- Quarantine new plants for a week or two with a sticky card in the pot before putting them near your collection.
- Give plants more light and airflow. Soil dries faster near a bright window or with a small fan in the room.
- Keep indoor humidity reasonable. Very damp rooms slow drying; our guide on how to reduce humidity in the house explains healthy targets.
When to call a professional
Most fungus gnat problems don’t need a pro. Call a pest control company or a local extension office if gnats persist after four to six weeks of drying soil and treating larvae, if you find tiny flies in rooms without plants (a sign of a drain, moisture or sewer problem), if you notice wet walls, musty smells or mold near where gnats gather, or if you run a greenhouse or large plant collection where damage is spreading. For flies coming from sinks or floors, see our guide on how to get rid of drain flies.
Frequently asked questions
How long does it take to get rid of fungus gnats?
Usually three to four weeks. That’s about one full life cycle, from egg to adult. You’ll see fewer adults within a week if you let the soil dry and use sticky traps, but eggs and larvae already in the soil keep emerging. Keep treating with Bti and keep traps up until sticky cards stay clean for about two weeks.
Can fungus gnats live in dry soil?
Not for long. Fungus gnat eggs and larvae need moist soil, so letting the top 1 to 2 inches dry out kills many of them and makes the pot unattractive for egg laying. Deeper soil may stay damp, which is why Bti or a drench helps. Adults can survive a few days anywhere, but they won’t breed without damp soil.
Does hydrogen peroxide kill fungus gnats?
Yes, a drench of regular 3% hydrogen peroxide diluted with about four parts water kills larvae it contacts in the top of the soil. It breaks down into water and oxygen. Test it on one plant first, because it can stress sensitive roots, and never use stronger concentrations. It won’t catch adults, so keep sticky traps up.
Where do fungus gnats come from?
Most arrive in potting mix or on new plants, often as eggs or larvae you can’t see. Open bags of soil stored outdoors or in a damp garage are a common source. Adults can also fly in through open windows in warm months. Once inside, they spread from pot to pot wherever the soil stays moist.
Are fungus gnats harmful to humans or pets?
No. Fungus gnats don’t bite, sting or spread disease to people or pets. They’re mainly a nuisance around the house. The larvae can damage seedlings and cuttings by feeding on tiny roots, but healthy, established houseplants usually recover once the soil is managed. Keep traps and treatments out of reach of children and pets.
Next step: if you also have tiny flies near the fruit bowl, read our guide on how to get rid of fruit flies. For other household pests, start with our guide on how to get rid of mice.



