Every gardening forum has the same tip: sprinkle used coffee grounds on your soil and the fungus gnats vanish. I wanted it to be true, because I brew a pot every morning and the grounds were free. So I ran a three-week test on twelve infested pots. The gnats did not care.

For the real knockdown method, the complete fungus gnat plan is where I send people. This article is only about whether coffee is part of that answer. It is not.

Why Do Fungus Gnats Even Show Up?

Quick context, because the fix depends on which stage you hit. The adults are the annoyance. The larvae in the soil are the damage; they eat fine roots, especially on seedlings and Saintpaulia (African violet). The life cycle runs fast: egg to adult in 7 to 10 days at 21°C, which is why a small problem becomes a cloud in two weeks.

Do Coffee Grounds Kill the Larvae?

No. I dug through the top 2 cm of my test pots every four days. Larvae counts stayed flat: about 8 to 12 per 100 ml of soil in both the coffee-treated pots and the untreated controls. The grounds are organic matter, and damp organic matter is exactly what gnat larvae eat. I was essentially feeding them.

Worse, the treated pots held moisture longer. A 1 cm layer of wet grounds on top slowed the surface from drying, and gnats need damp soil to breed. Two of my twelve test pots got worse after I added coffee.

Do Coffee Grounds Repel the Flying Adults?

Barely, and only on contact, and only for a day. I watched adults land on the coffee-topped soil and walk across it without hesitation. A few that hit a thick fresh pile paused, then routed around the edge. None died. None turned back to the window. The "repel" effect, if it exists, is a mild dislike of walking on wet grit, not a barrier.

Contrast that with a real trap. The sticky trap comparison shows yellow cards catching 30 to 50 adults a week per infested plant. Coffee caught zero.

Why Does the Myth Persist?

Two reasons, both half-true.

One: caffeine is toxic to some insects in lab doses. True, but the caffeine left in used grounds is tiny, and it is bound in wet organic matter, not in a form that touches a larva underground. The lab studies use concentrated extracts painted on leaves, not spooned wet sludge on soil.

Two: fresh dry grounds smell strong to us, so we assume insects hate it. Gnats do not read scent the way we do, and a damp coffee crust just reads as more habitat.

I cover this and a dozen similar old-wives' tales in the common pest myths roundup.

What Actually Works (My Tested Shortlist)

After the coffee failure I ran the same twelve pots through the methods that do work:

  • BTI dunks. A quarter tablet per litre of water, watered in weekly. Larvae gone in 9 days. The BTI guide has the exact dose.
  • Sticky traps. Yellow, one per pot at soil level. Catches adults, breaks the egg-laying loop.
  • Let the top dry. Gnats need the top 2 to 3 cm damp. Water from the bottom and let the surface go chalky between drinks. The hydrogen peroxide flush knocks larvae on contact for bad pots.
  • Sand or grit topdressing. A 1 cm layer of horticultural sand denies adults a place to lay. Coffee does the opposite.

If the infestation is on an edible or pet plant, an insecticidal soap sprayed on the soil surface helps, though it is milder than BTI underground.

Three Mistakes That Make Gnats Worse

First: overwatering. Every gnat problem I inspect traces back to soil that never dries. Fix the watering before any product.

Second: bottom-watering then forgetting. Bottom watering is good, but if the saucer stays full, the top still stays wet from capillary pull. Empty the saucer after 30 minutes.

Third: trusting the coffee. It buys time you could spend on BTI, and it feeds larvae. I stopped using it the day my counts held flat.

Frequently Asked Questions

Q: Will coffee grounds at least stop gnats from laying eggs?

A: No. In my test, adults laid eggs in coffee-topped soil at the same rate as untreated soil. The damp organic layer actually invites laying. A 1 cm sand topdressing is what denies them the spot.

Q: What about fresh (unused) coffee grounds, not used ones?

A: Still no. The caffeine is marginally higher but still bound in wet matter and unreachable by larvae. You would need a concentrated extract painted on, which is not how anyone applies it at home.

Q: Can I mix coffee grounds into the soil instead of on top?

A: That makes it worse. Mixing adds moisture-holding organic matter through the whole pot, extending the damp zone larvae love. Keep coffee in the compost, not the pot.

Q: I read cinnamon works too. Does it?

A: Same verdict as coffee, and I test that separately. A light cinnamon dust slowed a few adults for hours, then they rerouted. Neither touches the larvae. See the myth roundup for the rest.

Q: How fast does BTI clear a real infestation?

A: About 9 days to no live larvae in my pots, because it kills the young but not eggs; you repeat weekly for three weeks to catch each hatch. Sticky traps handle the adults in parallel.

Coffee grounds are a fine soil amendment in the compost bin, not a fungus gnat control. My three-week test showed zero effect on larvae and only a brief, useless pause for a few adults. Dry the top 2 to 3 cm of soil, water from the bottom, and reach for BTI and sticky traps instead. Start with the step-by-step in eliminating fungus gnats for good.