Plant Problems October 13, 2026 Updated November 26, 2026

Fruit flies vs fungus gnats: which one is in your kitchen?

Fruit flies breed in fermenting food and drains. Fungus gnats breed in damp potting mix. Where the flies gather tells you which one you have, and the fix for each is different.

Educational botanical infographic illustration comparing fruit flies vs fungus gnats anatomy, habitat, and targeted trapping methods
Diagnosis framework

Troubleshoot the system before you change the inputs.

Symptoms

  • Tiny flies hovering around the fruit bowl, the bin, the sink drain or an open drink.
  • Small dark flies resting on, or walking across, the soil of a potted plant, and drifting up when you water.
  • Flies at both the plant and the kitchen counter at the same time.

Possible causes

  • Fruit flies: overripe fruit, fermenting food, residue in bottles and cans, a soiled mop or a drain that holds food waste.
  • Fungus gnats: potting mix that stays damp at the surface, so females have somewhere to lay eggs and larvae have fungi and organic matter to feed on.
  • Both: a household where food waste and overwatered pots sit within a few steps of each other.

Quick fixes

  • Watch where the flies gather for a day: fruit and drains point to fruit flies, pots point to fungus gnats.
  • Set a vinegar-and-soap jar by the fruit and a yellow sticky card by the pot, and see which one catches the flies.
  • For fruit flies, find and remove the breeding material; for fungus gnats, let the top inch of the mix dry between waterings.

Fruit flies vs. fungus gnats

ClueFruit fliesFungus gnats
Where you see themOver ripe fruit, open drinks, bins and drainsNear potted plants, on and above the soil
ColourDull tan to brownish yellow or brownish black; eyes usually bright red (UMD)Dark brown or black (Wisconsin)
Adult sizeAbout 1/8 inch (UMD)About 1/8 inch (Wisconsin)
LookBright red eyes in common species (Wisconsin)Delicate and mosquito-like, with slender legs and antennae longer than the head (UC IPM)
How they moveHover around the food source (Wisconsin)Weak fliers that run across the soil (UC IPM)
Breeding siteFermenting and rotting food, drains, soiled mopsMoist potting mix rich in fungi and organic matter
LarvaeWhitish, 1/4 inch, eyeless and legless, tapering towards the head (UMD), in the food itselfPale with a black head, 1/4 inch when mature (Wisconsin), in the potting mix
Life cycle8 to 10 days (UMD, Wisconsin)About 17 days at 75 °F (UC IPM); three to four weeks egg to adult (Wisconsin)
Vinegar trapCatches adultsDoes not work for monitoring (Wisconsin)
Main fixRemove the fermenting food or residueLet the top inch of mix dry; treat larvae if numbers stay high

Flies hovering over the fruit bowl, a drink or a drain are fruit flies. Small dark flies that stay near a potted plant and walk across its soil are fungus gnats. They are close to the same size, so the question is really where they came from and what they are feeding on, because that decides what you do next.

If the flies are in your plants and you are still not sure it is flies at all, the herb pest identification chart lays out the other small insects that show up on potted herbs.

Are they the same insect?

No. University of Wisconsin Extension says fungus gnats “are often mistakenly identified as fruit flies,” but “these are two distinct insects.” Fruit flies are the genus Drosophila. Fungus gnats are the family Sciaridae, which UC IPM also calls darkwinged fungus gnats. Their habits differ too: one breeds in fermenting food, the other in damp soil. That is why a trap or a clean-up aimed at one does nothing for the other.

Start with where they are

University of Wisconsin Extension says fruit fly adults “can be found hovering around overly ripe fruit (e.g., apples and bananas), open beer or soft drink containers, and bread, and near garbage disposals or waste cans.” University of Maryland Extension describes them as pests of the kitchen, with populations greatest indoors in late summer and fall.

Fungus gnats behave differently. UC IPM says they are “relatively weak fliers and usually don’t move around much indoors,” and that they often stay near potted plants and run across the potting mix. Wisconsin adds that you usually notice them flying around windows and lamps, or resting on the soil of potted plants.

So watch for a day. If the cloud is over the produce, the bin or the sink, it is fruit flies. If it lifts off a pot when you water, it is gnats. If you see both, you have two separate problems that happen to share a room.

Look closer, but do not trust size

Size is a poor discriminator here. University of Maryland Extension gives fruit flies as about 1/8 inch, dull tan to brownish yellow or brownish black, and Wisconsin gives them as 1/16 to 1/8 inch, light to dark brown. Wisconsin Extension gives adult fungus gnats as approximately 1/8 inch, dark brown or black. Same size, similar darkness.

Three features help more:

  • Eyes. University of Maryland Extension says fruit flies’ eyes are usually bright red. You need good light or a magnifier to see it.
  • Build. Wisconsin describes fungus gnats as delicate flies with dark, translucent wings, and says a magnifying glass shows a rounded Y-shaped set of veins near the wing tips. NC State Extension describes them as small, dark flies with long legs and antennae, and ones that are often mistaken for fruit flies. UC IPM compares their look to mosquitoes, with segmented antennae longer than their head.
  • Flight. Fruit flies hover around the food. Fungus gnats are weak fliers, are drawn to light, and spend much of their time running across the soil, as UC IPM describes.

Colour on its own will mislead you. Use it to support what the location already told you.

Why each one is there

The two flies are not interested in the same thing.

Fruit flies breed in fermenting food. Wisconsin says eggs are laid near the surface of fermenting and rotting material and the larvae feed on the yeast associated with it. The breeding site is often hidden. Wisconsin’s list includes onions, potatoes and squash stored out of sight, the bottom of trash cans where caked vegetable matter collects, bottles and cans waiting for recycling, mops and buckets soiled with garbage-laden water, floor drains holding fermenting organic matter, and “rotting bulbs, or wet, decaying plant material.” Wisconsin notes that banana peels or apple cores swept under furniture or appliances can support significant numbers of flies. University of Maryland Extension adds that damp mops or towels may hold enough food and moisture for development.

Fungus gnats breed in damp potting mix. Females lay eggs in moist soil, and the larvae feed on fungi and decaying organic matter there. Wisconsin calls them insects commonly associated with overwatered houseplants. UC IPM says they thrive in moist conditions, especially where decaying vegetation and fungi are abundant, and names moist compost and organic fertilizers as favourite breeding spots.

The overlap is a rotting plant part or soggy saucer, which can feed either one. If the pot itself is the damp problem, the overwatered vs underwatered guide helps you read the root zone.

Larvae and life cycle

The larvae live in different places, which gives you a second check.

Fruit fly larvae are in the food. University of Maryland Extension says the female lays eggs on the surface of the food or fermenting liquid, and the larvae are “whitish, 1/4 of an inch long, eyeless and legless, and taper towards the head.” They feed for 5 to 6 days, then crawl to drier areas to pupate. The whole cycle takes 8 to 10 days.

Fungus gnat larvae are in the potting mix. Wisconsin describes them as resembling pale worms with a black head, ¼ inch long when mature. UC IPM adds an elongated, whitish-to-clear, legless body, and says that when conditions are very moist and gnats are abundant, larvae can leave shiny slime trails on the soil surface that look like tracks from tiny snails.

Fungus gnats are also slower. Wisconsin’s timeline: a female lays up to 200 eggs in cracks on the surface of moist soil, eggs hatch in three to six days, larvae feed for one to two weeks, adults emerge four to five days after pupation and live about a week. Egg to adult takes three to four weeks under optimal conditions. UC IPM gives a shorter 17-day generation at 75 °F, and notes that warmer rooms speed it up. Indoors the generations overlap, Wisconsin says, so eggs, larvae, pupae and adults are all in the pot at once.

A simple two-trap test

If watching does not settle it, let the flies decide.

  1. Vinegar jar by the produce. University of Maryland Extension’s recipe: pour apple cider vinegar into the bottom of a glass jar, add a drop of dish soap, cover the top with plastic wrap secured with a rubber band, and poke a tiny hole in it. The hole lets flies in but makes it hard for them to get out. The same source says a commercial fruit fly trap works too; if you would rather not make one, browse fruit fly traps on Amazon (Amazon, opens in a new tab).
  2. Yellow sticky card by the pot. UC IPM says yellow sticky traps can be cut into smaller squares, attached to skewers and placed in pots to trap adults. Wisconsin recommends yellow cards for monitoring gnats, says they are sold at hardware and garden stores, often with small stakes for pots, and notes that vinegar traps do not work for that job. To pick some up, browse yellow sticky traps for houseplants on Amazon (Amazon, opens in a new tab).

A jar that fills up points to fruit flies. A card that fills up points to gnats. You can also check for larvae: Wisconsin suggests laying potato slices on the soil and checking them for maggots after three to four days, and UC IPM specifies raw potato chunks placed with the cut side down.

Fixing fruit flies

University of Maryland Extension is blunt: the primary control is sanitation. Eliminate the larval food and development sites. That means:

  • Keep fruit in the refrigerator.
  • Rinse and drain bottles and cans before recycling.
  • Squeeze mops out thoroughly and dry them.
  • Check for hidden produce and for food residue in the bottom of the bin and in drains.

Wisconsin makes the same point: the only way to completely stop a fruit fly problem is to find and eliminate the breeding sites. Indoor flying-insect sprays containing pyrethrins control only the adults present at the time of spraying and leave no residual protection, so they do not end the problem.

Food scraps you are saving for composting are a common source. Open scraps are exactly the fermenting material the larvae need. A sealed bokashi bucket keeps them in a closed container instead of on the counter, and the bucket’s lid is part of how the method works.

Because the cycle takes only 8 to 10 days, according to both University of Maryland Extension and University of Wisconsin Extension, a clean-up followed by a trap usually shows results within a couple of weeks.

Fixing fungus gnats

Here the potting mix is the target, not the kitchen. Wisconsin calls changing the watering the single most important step: let the top inch of soil dry out before you water, or water from below to keep the surface dry. UC IPM gives the same advice, to allow the surface of container soil to dry between waterings. Wisconsin also suggests a half-inch to one-inch layer of coarse sand or fine gravel on top to make the surface less attractive for egg-laying.

Adults are mostly a nuisance. Wisconsin says they do not feed on or damage plants, and larval root damage is rare in home settings. Seedlings and young plants are the exception UC IPM flags, since large numbers of larvae can damage roots and stunt growth.

For larvae, both extension sources point to Bti, a biological insecticide that targets fly larvae in the soil. UC IPM says infestations may need repeated applications at about five-day intervals, and Wisconsin says a heavy infestation may take multiple treatments over time; it also notes that Bti does not affect eggs, pupae or adults. Follow the product label. The full routine is in the guide to fungus gnats in herb pots.

Be patient. As the life cycle above shows, gnats take weeks to clear, and Wisconsin says it may take three to four weeks of modified watering to get them in check. Gnats that come back after a week are normal, not a sign the method failed.

When it is neither

Root aphids

A small winged insect near a pot could be a winged aphid rather than a gnat. UC IPM says adult aphids are generally wingless, but most species also occur in winged forms, “especially when populations are high or during spring and fall.” The test is the back end: UC IPM says most aphid species carry a pair of tubelike cornicles projecting backward from the hind end, which distinguishes them from all other insects. For aphids that live in the soil, NC State’s check is the white wax on the root ball (below). Fungus gnats have no cornicles and look like tiny mosquitoes.

The root-feeding colony is the real problem, and it is underground. NC State Extension says root aphids in potted plants settle into colonies and do not move around much, and that the white fluffy wax they excrete gives them away. Slide the plant out of its pot and look at the root ball. UC IPM gives the lettuce root aphid as an example of a soil dweller that makes plants wilt. White wax on roots can also be root mealybugs, which the guide to white fuzzy stuff on roots helps you separate. NC State’s advice is to throw away infested plants and not reuse the potting soil. The aphids on indoor herbs guide covers the leaf-feeding kind.

Springtails and shore flies

Tiny bugs that jump rather than fly are probably springtails, which need a different response. The springtails vs fungus gnats comparison covers that test. Small flies with short, bristle-like antennae are shore flies, which UC IPM separates from fungus gnats by their antennae.

Common mistakes

  • Hanging a vinegar trap beside a plant and concluding there are no gnats when it stays empty.
  • Cleaning the kitchen thoroughly while the damp pot on the windowsill keeps producing gnats.
  • Spraying the air. Wisconsin says spraying the air with insecticides is ineffective for fungus gnats, and that adults rest on the soil surface where treatments should go.
  • Judging by size or colour alone.
  • Stopping treatment after one week because the flies seem gone.

Sources

FAQ

Common questions

How can I tell fruit flies from fungus gnats?

Look at where they are. Fruit flies gather around overripe fruit, open drinks, bins and drains, and their eyes are usually bright red, according to University of Maryland Extension. Fungus gnats are dark brown or black, stay near potted plants and run across the soil. Size will not help, since both are about 1/8 inch.

Why do I have tiny flies near my houseplants but not near the fruit?

That pattern points to fungus gnats. University of Wisconsin Extension describes fungus gnats as insects commonly associated with overwatered houseplants, with larvae that feed on decaying organic matter and fungi in the soil.

Will a vinegar trap work for fungus gnats?

No. University of Wisconsin Extension says vinegar traps and other methods used to monitor fruit flies do not work for monitoring fungus gnats. A yellow sticky card placed near the plant is the monitoring tool it recommends.

Are fruit flies and fungus gnats the same insect?

No. University of Wisconsin Extension says fungus gnats are often mistakenly identified as fruit flies, but the two are distinct insects. Fruit flies belong to the genus Drosophila and breed in fermenting food. Fungus gnats belong to the family Sciaridae and breed in moist potting mix.

How fast do fruit flies and fungus gnats multiply?

Fruit flies complete their life cycle in 8 to 10 days, according to University of Maryland Extension. UC IPM puts the fungus gnat generation at about 17 days at 75 °F, and Wisconsin Extension says egg to adult takes three to four weeks under optimal conditions, so expect gnats to take longer to clear even after the soil starts drying.

How do I tell flying root aphids from fungus gnats?

Look for cornicles. UC IPM says most aphid species have a pair of tubelike structures projecting backward from the hind end, which distinguishes them from all other insects, and that most also occur in winged forms. Fungus gnats are slender, mosquito-like flies with antennae longer than their head. Root aphids themselves stay in the soil, and NC State Extension says the white fluffy wax they excrete on the root ball gives them away.

Written by

Manuel Moro

Founder and editor

Manuel Moro founded and edits Urban Harvest Lab. Every guide is researched from horticulture and university-extension sources and edited for accuracy, focused on the real questions small-space growers ask. Spotted something to fix? Get in touch.