A few simple household ingredients can trap and kill fungus gnats, but the most effective approach combines traps for the flying adults with methods that target larvae hiding in your soil. Adult gnats live only 7 to 10 days, but a single female can lay up to 200 eggs in that time, and an entire generation completes in as little as 17 days. Trapping adults alone won’t end the cycle. Here’s how to build DIY traps that work on both fronts.
Apple Cider Vinegar Trap
This is the most popular DIY option and requires three things you probably already have. Pour about one-third cup of apple cider vinegar into a small jar or shallow bowl. Add two tablespoons of water and a single drop of liquid dish soap. The vinegar’s fermentation smell draws gnats in, and the soap breaks the surface tension of the liquid so they sink and drown instead of landing and flying away.
Place the trap right next to the affected plant, as close to the soil surface as possible. Fungus gnats are weak fliers and tend to hover near the pot they emerged from. Set out one trap per infested plant rather than a single trap across the room. Replace the mixture every two to three days, because the vinegar smell fades and the surface gets cluttered with dead gnats, reducing its pull on new ones.
One common mistake: people assume this trap works the same way on fungus gnats as it does on fruit flies. Fruit flies are strongly attracted to vinegar because they feed on fermenting fruit. Fungus gnats are drawn to it too, but less intensely. The vinegar trap will catch adults, but it won’t wipe out a heavy infestation on its own.
Yellow Sticky Card Traps
Fungus gnats are specifically attracted to the color yellow. You can buy yellow sticky cards cheaply at any garden store, but you can also make a version at home. Coat a piece of yellow cardstock or a yellow index card with a thin layer of petroleum jelly or honey on both sides, then attach it to a skewer or popsicle stick and push it into the soil near the base of the plant. Position the card just above the soil surface where adults congregate.
These traps are especially useful as a monitoring tool. If you’re catching dozens of gnats per day on a single card, you have a significant breeding population in that pot’s soil. If you’re only catching a few, your soil-level interventions are working. Check and replace the cards every few days once they’re covered.
Why You Need to Target the Larvae Too
Most of a fungus gnat’s life is spent as a larva and pupa in the soil, not as a flying adult. At typical indoor temperatures around 75°F, eggs hatch in about 3 days, larvae develop over roughly 10 days, and pupae emerge as adults 4 days after that. The adults you see buzzing around your plants are the tip of the iceberg. Killing them with traps is satisfying, but it doesn’t touch the next wave developing just below the soil surface.
This is why UC’s Integrated Pest Management program specifically recommends targeting the immature stages rather than relying on adult control. The best results come from running adult traps and larval treatments at the same time for at least two to three full life cycles, roughly five to six weeks.
Hydrogen Peroxide Soil Drench
A hydrogen peroxide drench kills larvae on contact without harming your plant’s roots. Mix one part standard 3% hydrogen peroxide (the kind sold at pharmacies) with four parts water. Water the affected plant with this solution as you normally would, soaking the soil thoroughly. You’ll see fizzing at the surface as the peroxide reacts with organic matter and larvae in the top layer of soil. That fizzing is a good sign.
Let the soil dry out completely between treatments. Repeat the drench once a week for three to four weeks to catch newly hatched larvae that weren’t present during the first round. The peroxide breaks down into water and oxygen quickly, so it won’t build up in the soil or damage beneficial microbes long-term.
Raw Potato Slice Monitoring
This method doubles as both a trap and a diagnostic tool. Cut a raw potato into half-inch slices and lay them flat on the soil surface of a suspected pot. Fungus gnat larvae feed on organic matter and are attracted to the moisture and starch in the potato. After 48 hours, flip the slices over. If you see small, translucent worm-like larvae on the underside or tunneling into the potato flesh, you’ve confirmed the infestation and located which pot is the source.
Remove and discard the slices (along with the larvae attached to them) and replace with fresh ones. This won’t eliminate a large population on its own, but it physically removes larvae from the soil and helps you figure out which plants need the hydrogen peroxide treatment.
Dry Out the Top Layer of Soil
Fungus gnats breed in moist organic matter. Overwatered houseplants are the number one breeding site indoors. The single most effective preventive step is letting the top inch or two of soil dry completely between waterings. Fungus gnat eggs and young larvae can’t survive in dry conditions, so breaking the moisture cycle disrupts reproduction at the source.
If you have plants that need consistently moist soil, consider bottom-watering instead. Place the pot in a tray of water and let the soil absorb moisture from below, keeping the top layer dry while the root zone stays hydrated. You can also add a half-inch layer of coarse sand or small pebbles on top of the soil to create a dry barrier that discourages females from laying eggs.
Putting It All Together
The most reliable DIY plan uses all of these methods in combination over a five to six week window. Start by identifying which pots are infested using potato slices or yellow sticky cards. Set vinegar traps and sticky cards near every affected plant to catch adults and prevent egg-laying. Drench the soil with the hydrogen peroxide mixture once a week. Between drenches, let the soil dry out as much as your plant can tolerate.
The reason you need five to six weeks is simple math: a new generation emerges roughly every 17 days. You need to outlast at least two full cycles to catch larvae that were eggs during your first treatment, plus any stragglers that pupated deep enough to survive the drench. If you stop after one or two weeks because you don’t see adults flying around, the next generation will hatch and restart the problem.