How to Get Rid of Fruit Flies

Does Diatomaceous Earth Kill Fruit Flies?

How food-grade DE works on larvae and gnats — where it helps and its limits.

Diatomaceous earth (DE) has a loyal following as a chemical-free insect killer, so it is natural to wonder whether a dusting of it will end a fruit fly problem. The honest answer: DE is a genuinely useful powder for the right pest, and fruit flies are almost entirely the wrong pest for it. Here is exactly how the dust works, why it struggles against a flying insect that breeds in wet places, and the one narrow situation where it earns its keep — plus what actually clears a swarm.

⚡ Quick answer

Food-grade diatomaceous earth works slowly and only where it stays dry, so it is a tool for soil-dwelling larvae and fungus gnats, not for killing airborne adults. Dusted on the surface of houseplant soil, it can dehydrate gnat larvae over several days. It does nothing to flies in the air or larvae in wet drains.

A pile of white diatomaceous earth powder, a natural insect-control dust
Photo: SprocketRocket

In short

What it is
A fine powder of fossilised algae that kills insects by abrasion and drying
Works on
Crawling insects walking across a dry, dusted surface
Against fruit flies
Largely ineffective — they fly, and they breed in wet material where DE stops working
Only real use
A thin layer on dry houseplant soil, and only if your pest is fungus gnats
The rule
DE never removes a breeding source — pair any dusting with cleaning and trapping

What diatomaceous earth is and how it kills insects

Diatomaceous earth is a soft, chalky powder made from the fossilised skeletons of diatoms — microscopic algae whose shells are built of silica. Ground fine, those shells are sharp on an insect's scale: as a bug crawls through the dust, the abrasive particles scratch its waxy outer cuticle and absorb the oils and waxes that seal moisture in. Stripped of that waterproof layer, the insect slowly dehydrates and dies. There is no poison and no nervous-system effect; it is a purely physical, drying action, which is why DE appeals to people who want to avoid chemical sprays.

That mechanism sets two hard conditions. First, the insect has to physically walk through a layer of the powder — DE does nothing to a bug that never touches it. Second, the dust must stay bone dry. The moment DE gets damp it clumps, the sharp edges are neutralised, and it stops killing anything. Both conditions matter enormously for fruit flies.

Why fruit flies mostly ignore it

Fruit flies fail the first condition simply by being airborne. The adults you see are flitting between the fruit bowl, the bin and the sink in short hovering hops; they rarely spend time crawling across open counters where a dust layer would sit. A fly that lands on a fruit for a moment and lifts off again picks up little or nothing. You cannot dust the air, and you cannot dust the surfaces they actually visit — you would not want DE spread across the fruit and worktops where you prepare food.

They fail the second condition even more decisively. Fruit flies breed in moist, fermenting material: the biofilm inside a drain or garbage disposal, the damp gunk under a fridge, a softening onion at the back of a cupboard, wet compost, spilt juice. These are precisely the wet environments where diatomaceous earth clumps and dies. You cannot dust the inside of a drain and expect a dry, abrasive layer to persist — it simply turns to paste. So the powder misses the adults (which fly) and cannot reach the eggs and larvae (which live in the wet). That is most of the fruit fly life cycle untouched.

Reality check: No amount of DE clears a fruit fly infestation while a breeding source is still producing new flies. If a "remedy" only targets the odd adult that happens to crawl through it, it is a supporting act at best — see the honest roundup in our natural remedies overview.

The one place it can genuinely help

There is a narrow scenario where DE is worth a try, and it hinges on correct identification. If the little fliers are swarming around your houseplants rather than the kitchen, you may not have fruit flies at all — you may have fungus gnats, whose larvae live in the top layer of damp potting soil. A thin, even layer of food-grade DE spread over the surface of dry soil creates a gritty, drying barrier that discourages the adults from laying eggs there and desiccates larvae as they move through it. It only works if the soil surface is allowed to dry out (which also starves the gnats of the moisture they need), so it pairs well with letting plants dry between waterings.

Even here, DE is a supplement, not a solution. Yellow sticky traps and letting the soil dry are the mainstays; beneficial nematodes or a BTI product in the soil kill larvae far more reliably. Confirm the insect first with the which-fly identifier, and if it really is gnats in the pots, follow the full approach in fruit flies in houseplants. For true fruit flies breeding in a drain or the bin, DE on the soil does nothing at all.

Using it safely, if you try it

DE is low-toxicity, but the fine dust is an irritant and the food-grade versus pool-grade distinction matters, so a little care is warranted.

  1. Buy food-grade DE. Pool-grade (filter) DE is heat-treated into a different, hazardous crystalline silica and must never be used around living spaces. Only food-grade DE is appropriate indoors.
  2. Wear a dust mask. Breathing the airborne powder irritates the nose, throat and lungs. Apply in a well-ventilated spot and avoid creating a cloud.
  3. Apply a thin layer, and keep it dry. A light dusting works better than a thick pile, and it must stay dry to do anything. Re-apply after watering or if it gets damp.
  4. Keep it off food surfaces. Never dust worktops, the fruit bowl, or anywhere you prepare food. Confine it to dry soil surfaces or hidden dry crevices, away from children and pets.

Tip: If you have reached for DE because the flies "won't die," the missing piece is nearly always an untouched breeding site rather than a weak product. Track it down with how to find the breeding source before buying anything else.

DE for fruit flies, weighed up

Pros

  • Chemical-free and low-toxicity when food-grade
  • Can help suppress fungus gnats at a dry soil surface
  • Cheap and long-lasting if kept dry

Cons

  • Useless against flying adults that never crawl through it
  • Stops working the instant it gets wet — so it cannot treat drains or damp breeding sites
  • Cannot be used on the food surfaces fruit flies frequent
  • Does nothing to remove eggs, larvae, or the source
  • Dust is a respiratory irritant

What actually clears fruit flies

The method that reliably ends a fruit fly problem is the same one DE cannot deliver: remove what they are breeding in, and trap the adults at the same time. Start by finding the fermenting source, then clean it out — scrub drains mechanically rather than trusting any powder or spray to reach the biofilm inside.

Follow that sequence and you rarely need any powder, spray, or gadget. The complete strategy lives on the remove fruit flies hub, and the five-day plan puts it on a timeline.

Bottom line: Diatomaceous earth is a fine tool for dry-crawling insects, but fruit flies fly and breed in the wet — the two things DE handles worst. Save it for fungus gnats on dry soil, and clear real fruit flies by removing the source and trapping the adults.

Sources

Keep them gone for good

Once the flies are gone, the next step is stopping new ones from coming in.