Skip to content
Swat & Snap
Fruit Flies & Gnats

How to get rid of gnats outside

Clouds of tiny flies on a porch or over a flower bed are almost always coming from something damp within a few metres of where you are standing.

By Ryder M.Published Updated

Pink lilies in a landscaped garden beside a stone-lined stream
Quick answer
Find the damp organic matter they are breeding in and dry it out — overwatered pots and beds, wet mulch piled against the house, a clogged gutter, a saucer of standing water, or a compost heap that has gone soggy. That single step ends most outdoor gnat problems within one or two weeks. Treat water you cannot drain with BTI granules, put yellow sticky stakes in the affected pots to clear the adults, and skip the fogger.
Disclosure

Swat & Snap earns a commission from qualifying purchases made through the links on this page, at no extra cost to you. It does not change which products we pick — see how we pick and our affiliate disclosure.

First, work out which gnat you have

"Gnat" is not a species — it is what people call any small flying insect that is not obviously a fly or a mosquito. Outdoors, three different insects get the name, and the fix for each is different.

Fungus gnats. Dark, mosquito-shaped, about 3 mm, weak and drifting fliers. They hover low over soil, mulch and pots, and they rise in a cloud when you disturb the surface. The larvae live in the top few centimetres of wet organic matter. This is the one most people mean, and it is a moisture problem.

Non-biting midges. Slightly larger, often in dense mating swarms at head height near water at dusk. They breed in ponds, ditches and slow water, they do not bite, and they are almost impossible to control at source on a domestic property. The answer here is management rather than elimination.

Biting midges (no-see-ums). Very small, and you will know because they bite — a sharp sting disproportionate to the size, usually at dawn and dusk near damp sand, marsh or coastal mud. These need a repellent, not a trap.

If they are also indoors around your houseplants, the species is almost certainly fungus gnats, and fungus gnats in houseplants is the page you want. If they are in the kitchen around fruit or the bin, they are fruit flies, not gnats — gnats vs fruit flies vs drain flies separates all three in a table.

Find the damp thing

Fungus gnats need consistently wet organic matter. On a domestic property the source is nearly always one of these, and it is nearly always within a few metres of where you noticed them.

Walk the area and check, in rough order of how often each one turns out to be the answer:

  1. Pots and planters that are watered on a schedule rather than when they are dry. The top of the compost stays wet, which is exactly the habitat.
  2. Mulch piled too deep or heaped against a wall. Mulch should be a few centimetres and pulled back from the foundation. Deep, matted, permanently damp mulch is a gnat farm.
  3. A clogged gutter or downpipe. Wet leaf litter in a gutter is organic matter held permanently damp, often directly above the porch where you are seeing them.
  4. Saucers and trays under pots holding water between waterings.
  5. A compost heap that has gone anaerobic — soggy, flat and sour-smelling rather than warm and crumbly.
  6. A low spot in the lawn or a border that stays wet for days after rain or after the irrigation runs.
  7. Leaking outside tap, air-conditioning condensate line, or a slow hose connector.
  8. Grass clippings or leaves bagged and left against the side of the house.
  9. A bird bath, water butt, pond edge or rain barrel with debris in it.
  10. Under a deck, where it is shaded, the soil never dries and leaves accumulate.

Lift things. The source is often under something rather than in the open.

Dry it out — this is the actual fix

Everything else on this page is secondary to this section. Gnats are an indicator of standing moisture, and when the moisture goes they go.

  • Water pots deeply and less often, letting the top 2-3 cm dry out between waterings. Water from below where you can. Dry surface soil breaks the breeding cycle outright.
  • Empty every saucer and tray.
  • Rake mulch out thin and pull it back 15-30 cm from walls and foundations. Replace matted old mulch rather than topping it up.
  • Clear the gutters and check the downpipes run freely.
  • Turn the compost and add dry brown material — cardboard, dry leaves, straw — until it is damp rather than wet.
  • Fix the leak, whichever one it is.
  • Improve drainage in the low spot, or stop irrigating it.
  • Cut back dense ground cover that holds humidity against the soil.

Expect a visible reduction in about a week and the problem largely gone in two, because that is roughly one generation. Nothing you spray will beat that timeline, and most sprays will not match it.

At a glance

Quick picks

#ProductBest forMechanismPrice
1
Hands potting a houseplant, with soil and garden tools alongside
Our pickSafer Brand Houseplant Sticky StakesYellow sticky cards on a stake, pushed into the pot. They catch the adults while you fix the watering, which is the part that actually ends a gnat problem.
Gnats in potting soilYellow adhesive card
2
A metal watering can beside green shrubs in a garden
Summit Mosquito BitsThe same BTI in granules. Releases faster than a dunk and doubles as the correct treatment for fungus gnats in houseplant soil.
Fast knockdown and fungus gnatsBTI granules
3
Planters hanging along a garden fence
RESCUE! Non-Toxic Disposable Fly TrapA hanging bag with a powerful bait. Effective, genuinely foul-smelling, and therefore a product you hang well away from the door you use.
Outdoor house fliesWater-activated attractant bag
4
A sunny garden of grass and rocks
DynaTrap DT1775 Insect TrapUV light plus a titanium-dioxide CO2 surface and a fan. It is a trap, not a zapper, and that distinction is the whole reason it belongs on a mosquito page.
Yard-scale mosquito reductionUV + TiO2 CO2 lure + suction fan

#ad — every price link goes to Amazon and Swat & Snap earns a commission on qualifying purchases. No price is shown until it can be pulled live from the retailer.

Hands potting a houseplant, with soil and garden tools alongside
Our pickPet-safe design

Safer Brand Houseplant Sticky Stakes

Safer Brand · Gnats in potting soil

Yellow sticky cards on a stake, pushed into the pot. They catch the adults while you fix the watering, which is the part that actually ends a gnat problem.

Specification
MechanismYellow adhesive card
PlacementIn the pot, just above the soil
LifeUntil the card is full
ChemicalsNone
Why it is here
  • Also a diagnostic: a full card in three days tells you the soil is the source
  • No chemistry near a plant you might eat from
What it will not do
  • Adults only — larvae in the soil need drying out or a BTI product
  • Visible yellow cards in a display pot

Check price on Amazon

A metal watering can beside green shrubs in a garden
Pick 2Pet-safe design

Summit Mosquito Bits

Summit · Fast knockdown and fungus gnats

The same BTI in granules. Releases faster than a dunk and doubles as the correct treatment for fungus gnats in houseplant soil.

Specification
ActiveBTI granules
ReleaseRapid, roughly 24 hrs
Duration7-14 days
Second useFungus gnat larvae in pots
Why it is here
  • Scatterable, so it treats a bog or a tray a dunk cannot sit in
  • The one product that solves both a yard problem and a houseplant problem
What it will not do
  • Shorter residual than a dunk — reapply more often
  • Granules wash away in heavy rain

Check price on Amazon

Planters hanging along a garden fence
Pick 3

RESCUE! Non-Toxic Disposable Fly Trap

RESCUE! · Outdoor house flies

A hanging bag with a powerful bait. Effective, genuinely foul-smelling, and therefore a product you hang well away from the door you use.

Specification
MechanismWater-activated attractant bag
CapacityManufacturer states up to 20,000 flies
Placement30+ feet from the house
DisposalWhole bag
Why it is here
  • Pulls flies away from a patio better than anything else at the price
  • Nothing to plug in, nothing to refill
What it will not do
  • The smell is the mechanism — hang it close and you have made things worse
  • Full bags are unpleasant to take down

Check price on Amazon

A sunny garden of grass and rocks
Pick 4

DynaTrap DT1775 Insect Trap

DynaTrap · Yard-scale mosquito reduction

UV light plus a titanium-dioxide CO2 surface and a fan. It is a trap, not a zapper, and that distinction is the whole reason it belongs on a mosquito page.

Specification
MechanismUV + TiO2 CO2 lure + suction fan
CoverageManufacturer states up to 1 acre
PowerMains, runs continuously
Running costBulbs, roughly annually
Why it is here
  • Lures with warmth and CO2, which is what mosquitoes actually track
  • Silent apart from the fan — no snapping, no smell
What it will not do
  • Takes weeks to dent a population, not one evening
  • Runs continuously, so it is an ongoing power draw

Check price on Amazon

Treat what you cannot dry

Some water is not going anywhere: a pond, a water butt you want, a bog garden, a blocked natural low spot, a tree hole.

For those, use BTI — Bacillus thuringiensis israelensis, a naturally occurring soil bacterium that kills the larvae of fungus gnats, mosquitoes and black flies, and is harmless to fish, birds, pets and people. The EPA describes it as a larval control tool, and the granule format is the one to use outdoors because you can scatter it over soil and mulch as well as dropping it in water.

Practical notes:

  • Granules release quickly and last one to two weeks, so reapply through the season and after heavy rain washes them away.
  • Scatter over the surface of affected pots and beds, then water in lightly.
  • Floating dunks are the format for a container of water you are leaving in place, and last around a month.

Mosquito dunks vs bits compares the two formats properly. It is written for mosquitoes, but it is the same product doing the same job on the same larvae.

Trap the adults that are already flying

Drying the source stops the next generation. It does not do anything about the cloud currently drifting across the patio, and that generation lives one to two weeks.

Yellow sticky stakes in the pots. Fungus gnats are strongly attracted to yellow, and a card pushed into the compost just above the surface catches the adults as they emerge. It is also the best diagnostic on this page: a card that fills in three days confirms the pot is a source, and a card that stays clean tells you to look somewhere else.

A hanging bait trap, for larger flies. If what is bothering you on the patio turns out to be house flies rather than gnats, a disposable attractant bag works well — but hang it at least 30 feet from the door you use, because the smell is the mechanism and hanging it close makes the situation worse rather than better.

A UV and fan trap. An outdoor trap that pulls insects in with light, warmth and a fan does catch gnats and midges along with everything else. Treat it as slow background pressure over weeks rather than a fix, and place it away from where you sit rather than next to it. Best mosquito traps covers the category, and DynaTrap vs Flowtron compares a trap against a zapper honestly.

What not to bother with

Foggers and hose-end sprays for gnats. A fog kills the adults in the air at the moment you spray and nothing else. The larvae in the soil are untouched, so a fresh generation emerges within days and you have achieved an afternoon. Pyrethroid yard concentrates are also toxic to bees and lethal to fish — never spray flowering plants or anywhere near a pond. Our general position on yard spraying is in natural mosquito control and pet-safe mosquito yard sprays.

Bug zappers. University of Florida research found zappers essentially useless for mosquito control, and the broader finding holds here too — the catch is overwhelmingly harmless non-target night-flying insects, and the gnats you care about are not phototactic enough to make up for it. Do bug zappers work.

Dish soap sprays on the soil. Will not reach larvae at depth, and repeated application damages roots.

Apple cider vinegar bowls outdoors. These work on fruit flies, which respond to fermentation odour. Fungus gnats largely ignore them, and outdoors the dish fills with rain and other insects. Indoors for fruit flies, it is a different story — fruit fly trap bait covers that.

Citronella candles, for anything. A small plume of smoke that any breeze disperses.

The two gnats you cannot really fix

Swarms of non-biting midges near water are seasonal and they come from the water body rather than from your property. You can reduce how much they bother you — keep outside lights off or switch to warm-toned bulbs, which attract far fewer insects, close windows at dusk, fit insect mesh, and sit upwind — but you cannot eliminate the source if the source is a lake.

Biting midges need a skin repellent rather than a trap, because the whole problem is that they come to you. A registered active on the CDC's list, applied before dusk, is the answer. Best yard mosquito repellents and best mosquito repellents for camping both cover the products that actually work on skin.

The order, one more time

  1. Identify which gnat it is.
  2. Find and dry the damp organic matter. This is the fix.
  3. BTI granules on the soil and in water you are keeping.
  4. Yellow sticky stakes to clear the adults already flying.
  5. Outside lights off or warm-toned, and mesh on the windows you open.
  6. A trap only as slow background pressure, placed away from where you sit.
Questions

Frequently asked

How do I get rid of gnats outside?
Find the damp organic matter they are breeding in and dry it out — overwatered pots, deep wet mulch, a clogged gutter, saucers of standing water or a soggy compost heap. That ends most outdoor gnat problems in one to two weeks, which is roughly one generation.
What causes gnats outside?
Consistently wet organic matter. Fungus gnat larvae live in the top few centimetres of damp soil, mulch, compost or leaf litter, so anything that stays wet for more than a few days becomes a breeding site.
What kills gnat larvae in soil outdoors?
BTI granules — Bacillus thuringiensis israelensis, a soil bacterium that kills gnat and mosquito larvae and is harmless to fish, birds, pets and people. Scatter over affected soil and mulch, water in lightly, and reapply after heavy rain.
Do bug zappers or foggers get rid of gnats outside?
No. A fogger kills only the adults in the air at that moment while the larvae in the soil continue developing, so a new generation emerges within days. Zappers were found essentially useless for mosquito control by University of Florida researchers and the catch is dominated by harmless insects.
Why are there so many gnats on my porch?
Usually a clogged gutter directly above it, mulch piled against the wall, or pots that are watered on a schedule rather than when they are dry. Check those three first, and keep porch lights off or switch to warm-toned bulbs, which attract far fewer insects.
Sources
Next step

More on fruit flies & gnats

Tiny flies in the kitchen are almost never one problem. Identify which of the three you have, then treat the source — the trap alone never finishes it.

Not sure yet? Read how we pick.

About the author

Ryder M.

Ryder M. is the hands-on owner behind Magoo Media Group. He writes Swat & Snap because he got tired of pest-control advice that was either a sales pitch or a scare story.

How we pick · Editorial policy · About Swat & Snap

Read next