Fungus Gnats in Hydroponics, and Why the Usual Advice Does Not Work
Small dark flies drifting up whenever you move the tray. Every guide you find will tell you the same thing, which is to let the surface of the growing medium dry out between waterings. That is sound advice for a houseplant and it is close to useless here, because in a hydroponic system the medium is wet by design and you cannot dry it without starving the plant. So the whole approach has to be different, and it starts with understanding that the flies you can see are not the problem.
The adults are not doing the damage
Adult fungus gnats do not feed on your plants. They live about a week, they mate, and the female lays eggs in the cracks and crevices of damp growing medium. Killing the adults you can see does nothing about the generation already under the surface.
The larvae are the problem. They are small, white, legless and have a distinct black head, and they live in the top half inch of the medium. Young ones feed on root hairs and on algae. Older ones feed inside roots, on stems at the medium surface, and on any leaf lying against it. At high numbers they bore into larger roots.
Egg to adult takes about three to four weeks, and it is temperature driven. UC guidance puts it at roughly 21 days at 72F (22C) and 40 days at 61F (16C). The generations overlap continuously, which is why a population that is left alone does not rise and fall in waves. It just rises.

Gnat or shore fly
Worth two minutes, because the two insects look similar, turn up in the same places, and do not respond to the same treatments.
| Trait | Fungus gnat | Shore fly |
|---|---|---|
| Body | Delicate | Stocky |
| Antennae | Long | Short |
| Flight | Weak | Strong |
| Wings | Clear | Spotted |
| Larva | Black head | No head |
The larva settles it. A fungus gnat larva is white with an obvious dark head capsule. A shore fly larva is tan and has no head capsule at all.
A fungus gnat is the one that looks like a tiny mosquito, about an eighth of an inch long, with long legs and long antennae, and it flies badly. A shore fly is stouter with very short antennae and flies strongly, more like a miniature house fly.
The practical consequence is worth knowing before you spend money. Most of the biological controls that work on fungus gnats do not work nearly as well on shore flies, because shore flies live in a semi-aquatic film rather than in the medium. If you have shore flies, the answer is the algae they are living on rather than a product.
Why this matters more in hydroponics
In a houseplant, fungus gnats are mostly an annoyance. Here there are two reasons to take them more seriously than the nuisance warrants.
They carry disease. Larval root feeding opens wounds that let pathogens in, and the adults move pathogens around on their bodies and in their droppings. The extension alert on hydroponic lettuce names fungus gnat larvae and adult shore flies as vectors of the organisms behind root rot. An infestation is not just insects. It is a delivery service for the worst problem on this site.
They go for seedlings first. Damage is most serious in plugs and young plants, which is exactly where a hydroponic grower keeps a tray of damp cubes under a dome for weeks. A seedling with its root hairs eaten wilts while sitting in water, which reads as something else entirely. If you are starting seeds, this is the pest that will find them.
How they got in
Worth establishing, because two of the four routes are things you will do again next crop.
- In the bag. Extension guidance notes that infestations are commonest where the medium carries a high proportion of peat or compost. If you are using coir or a peat plug rather than clay pebbles, the material itself is a plausible source, and an opened bag stored damp in a shed is a better one.
- On a bought seedling. A plant from a garden centre arrives in wet potting compost, which is the ideal nursery. This is one of several reasons the site recommends starting your own rather than buying in.
- Through a window. The adults are weak fliers but they do not have to travel far, and anything damp and organic outside the door will produce them.
- From the puddle under the system. A slow drip onto a shelf, a reservoir that sweats, a tray that does not drain. Larvae develop happily in a wet patch with no plant in it at all, and then the adults move to your medium to lay.
The last one is the one worth walking round and checking, because it is the only route that keeps producing gnats after you have treated every pot you own. It is also the easiest to fix, which is a pleasant change in an article about insects.
Find out how bad it actually is
Two cheap measurements, and you want both because they count different things.
Affiliate disclosure: some links below are affiliate links. We may earn a commission if you buy through one, at no extra cost to you. As an Amazon Associate I earn from qualifying purchases. Full disclosure.
- Yellow sticky cards for the adults. Lay them horizontally just above the surface of the medium rather than standing them upright in the air. That is where the adults are, and horizontal cards catch far more of them. Any pack of yellow sticky cards will do, because the colour and the glue are the entire product. Change them weekly and actually compare one week against the last, because the trend is the only number that tells you whether anything you did worked.
- A potato slice for the larvae. Press a raw slice cut side down into the medium, leave it a couple of days, and lift it. Larvae gather underneath it to feed and you can count them. This is a standard extension monitoring method rather than a folk remedy, and it is the only way to see the stage that is doing the damage.

Take away what they are eating
This is the step that replaces drying the surface out, and it is the one most people skip because it does not feel like pest control.
Young fungus gnat larvae feed on algae. Shore flies live on it almost entirely. The green film on your reservoir lid, your medium surface and the inside of your tray is not a cosmetic problem, it is the food supply, and the article on algae is really the first half of this one. Block the light, cover the gaps around net pots, and the population loses its nursery.
The rest of the hygiene follows the same logic. Clear dead leaves off the medium surface, do not leave spent cubes or plugs lying in the tray, and keep the area under the system free of standing water. Every one of those is somewhere larvae can develop independently of your plants.
A reservoir change is a good moment to do all of it at once, since the tank is open, the tray is clear and you can see what has been accumulating under the lid. And if you run a flood table, the fact that it drains completely between cycles is doing more against this pest than it is usually given credit for. A surface that dries several times a day is a surface they struggle to breed on, which is the one place where the standard advice does quietly apply.
What actually kills the larvae
Two biological options with real evidence behind them, and both have conditions attached that explain most of the failures people report.
- Bti, a strain of Bacillus thuringiensis sold for gnat larvae. The larvae have to eat it, which means it only reaches the ones actively feeding, and it is most effective against the youngest stage. It also stays toxic for only about two days after application. One drench therefore does almost nothing against a population with overlapping generations. It needs repeating on a schedule across the life cycle, which is the instruction most people miss.
- Beneficial nematodes, specifically Steinernema feltiae. These enter the larvae and release a bacterium that kills them from the inside. Two conditions matter. They are extremely sensitive to ultraviolet light, so apply them in the evening or on a dull day rather than under a running grow light. And they need moist medium to move through, which for once is a condition hydroponics meets effortlessly.
Predatory mites and rove beetles are also sold for this and work on the same larvae. They suit a permanent setup better than a single crop, because they establish over time rather than acting quickly.
Note that both of the main options are preventative in character. They work best applied before the numbers are high, and neither clears a heavy infestation in a weekend. If you are already at the stage of flies in your face every time you walk past, expect to run a full life cycle, three to four weeks, before the picture changes.
What not to bother with
- Spraying the adults. Satisfying, pointless. You are killing the one stage that does no damage while the next generation develops untouched below.
- Sticky cards alone. They are a measurement first and a control a distant second. A card full of gnats tells you the population is high, not that it is falling. A card is also blind to anything that does not fly, which is most of what else can get into an indoor system.
- Letting it dry out. The advice everything online opens with, and in a hydroponic system it is either impossible or it costs you the crop. Covered here only because you will read it everywhere else.
- Cinnamon, sand layers and dish soap. Widely recommended for soil pots, and all aimed at a dry surface barrier that a wet medium cannot provide.
Where this comes from
Identification, the life cycle, the damage description and the monitoring methods are from the UMass Amherst greenhouse fact sheet on fungus gnats and shore flies, the UConn publication on managing both in greenhouse vegetable transplant production, and UC IPM’s fungus gnat guidelines, which is the source of the 21 and 40 day development figures. The Bti and nematode conditions, including the two day window and the sensitivity to ultraviolet light, are from the same UConn and UMass material. The observation that fungus gnat controls work less well against shore flies is UMass’s. The point that fungus gnats and shore flies vector root rot organisms is from the e-GRO alert on hydroponic lettuce already cited in our root rot article. Several of these extension pages are some years old, so check any product label before use.
Found this useful? Tell Google to show you more of it.
Add to Preferred Sources