Knowing how to get rid of flies in indoor plants is something every houseplant owner needs at some point because flies near indoor plants are one of the most persistent and cycle-prone pest problems you will encounter. You treat the problem, things improve, and then two weeks later the flies are back at the same numbers as before. This pattern almost always means the treatment addressed the adult flies without addressing the larvae and eggs in the soil producing new generations of adults continuously. Getting rid of flies in indoor plants permanently requires understanding which fly species you are dealing with, where they are actually breeding, and applying treatment at every stage of the life cycle simultaneously.
This guide covers 9 methods that work for every common fly species found near indoor plants, how to identify which fly is actually causing the problem, and why the ones that keep coming back are almost always a moisture and soil problem rather than a spray problem.
Quick Answer
To get rid of flies in indoor plants, first identify which fly species you are dealing with since treatment differs by species. For fungus gnats, the most common indoor plant fly, let soil dry between waterings and apply a hydrogen peroxide soil drench weekly for three weeks. Find and eliminate fermenting food sources and use apple cider vinegar traps for fruit flies. For shore flies, improve air circulation and reduce soil moisture. Yellow sticky traps and neem oil spray work across all three species as complementary treatments.
Which Fly Is on Your Indoor Plants
There are three main fly species found near indoor plants in most homes and they require different primary treatment approaches. Misidentifying the fly is the most common reason treatment fails to produce lasting results.
Fungus gnats are the most common indoor plant fly. They are small, dark, slender, and mosquito-like with long legs. They hover directly above soil surfaces and fly upward when the plant is watered or disturbed. Their larvae live in the top 2 to 3 inches of potting soil and feed on fungi and plant roots. The larvae cause the actual plant damage while the adults are primarily a nuisance. Consistently wet soil is their primary breeding requirement and the single biggest contributor to fungus gnat problems indoors.
Fruit flies are slightly larger and stockier than fungus gnats with distinctive red eyes and a tan or brownish body. They are primarily attracted to fermenting organic matter including overripe fruit, kitchen drains with organic buildup, open bottles, and the fermenting surface of moist potting soil. Their primary breeding site is often the kitchen rather than the plant soil, which is why treating plant soil alone sometimes fails to resolve a true fruit fly problem.
Shore flies look similar to fungus gnats but are stockier, darker, and have five distinctive white spots on their wings. They run quickly across soil surfaces rather than hovering and feed on algae growing on moist soil and pot surfaces. They cause less direct plant damage than fungus gnats but spread plant pathogens between pots as they move through a collection.
Once you have identified which fly you are dealing with, choose the treatment methods from the list below that target your specific species most directly.
9 Methods to Get Rid of Flies in Indoor Plants
Method 1: Correct Your Watering Immediately
Regardless of which fly species is causing the problem, reducing soil moisture is the single most important first step. All three common indoor plant fly species are significantly more attracted to moist soil than dry soil, and larvae of both fungus gnats and fruit flies cannot survive when soil dries out adequately between waterings.
Push your finger 2 inches into the soil of every affected plant. If you feel any moisture, do not water yet. Wait until that depth is completely dry before watering again. For plants that have been consistently overwatered, this may mean waiting several days longer than your usual schedule before the next watering.
This single change, applied consistently, resolves mild to moderate fungus gnat and fruit fly infestations without any chemical treatment in many cases, typically within two to three weeks as the larval population in the soil dies off from lack of moisture and the adult population declines without new generations emerging to replace it.

Method 2: Apply Hydrogen Peroxide Soil Drench
The hydrogen peroxide soil drench is the most effective direct treatment for fly larvae living in the soil. It kills larvae on contact through an oxidation reaction, is completely safe for plant roots at the correct dilution, and leaves no chemical residue as it breaks down into water and oxygen.
Mix 1 part 3% hydrogen peroxide with 4 parts water and apply it as a normal watering, saturating the root zone thoroughly. The bubbling you see in the soil is the oxidation reaction working. Apply once weekly for three consecutive weeks to cover the full larval development cycle and catch newly hatched larvae from eggs that survived the first application.
This method works effectively for both fungus gnat and fruit fly larvae. For shore flies whose larvae feed at the soil surface rather than deep in the root zone, the surface application is particularly effective since larvae are concentrated in the top layer where the peroxide contacts them most directly.
For the complete breakdown of soil-dwelling pest species and the full range of soil treatment options beyond hydrogen peroxide, bugs in indoor plant soil covers every species with specific treatment guidance for each one.
Method 3: Place Yellow Sticky Traps at Soil Level
Yellow sticky traps are an essential tool for managing every indoor plant fly species because they catch adult flies continuously and provide a clear visual indicator of whether your other treatments are working.
Place traps horizontally at soil level inside or directly beside affected plant pots. This position targets flies where they are most active: at the soil surface where they lay eggs and seek fermenting matter. A trap placed higher up near foliage catches fewer flies than one positioned at soil level for all three species.
Check traps every few days. A high catch rate tells you the population is still active. A decreasing catch rate over the course of two weeks tells you your soil treatments are successfully collapsing the larval population and fewer new adults are emerging.
Replace traps every 7 to 10 days as they fill and lose their stickiness. For fruit flies specifically, traps baited with a small drop of apple cider vinegar placed on the surface are significantly more effective than plain yellow traps since the fermenting scent provides an additional attractant beyond the visual yellow signal.
Method 4: Set Apple Cider Vinegar Traps for Fruit Flies
If the flies near your indoor plants are true fruit flies rather than fungus gnats, apple cider vinegar traps are the most effective adult-catching method available and far more targeted to fruit flies than yellow sticky traps.
Pour approximately one inch of apple cider vinegar into a glass or small jar. Add a single drop of dish soap and stir gently. The soap breaks the surface tension so flies that land on the liquid sink and drown rather than walking across the surface and escaping. Cover the opening with plastic wrap secured with a rubber band and poke 8 to 10 small holes in the plastic with a toothpick.
Place traps directly beside affected plants and near kitchen areas where fruit flies are most active. Replace every two to three days as the vinegar loses its fermenting scent and the trap fills with captured flies.
Apple cider vinegar traps address adult flies only. Always combine them with soil treatment methods to address the larval population simultaneously.
Method 5: Neem Oil Soil Drench
A neem oil solution applied directly to the soil provides a different mechanism of larval control from hydrogen peroxide, making it valuable as an alternating treatment or for infestations that are slow to respond to peroxide drenching alone.
Neem oil’s active compound azadirachtin is absorbed through plant roots and distributed through the plant tissue. Fly larvae feeding on roots treated with neem experience hormonal disruption that prevents them from completing their development and emerging as adults. This systemic action reaches larvae throughout the root zone rather than only in the top layer where surface treatments make contact.
Mix 2 tablespoons of pure cold-pressed neem oil with 1 teaspoon of dish soap and 1 quart of warm water. Apply as a normal watering every 7 to 10 days, alternating with hydrogen peroxide drenching for a combined approach that targets larvae through two different mechanisms.
For the full range of neem oil applications for both soil and above-ground pest control, indoor plant spray for bugs covers every product and application method with specific guidance on which pest each one addresses most effectively.

Method 6: Improve Drainage and Air Circulation
Poor drainage and stagnant air around indoor plants create the persistently moist conditions that all three indoor plant fly species prefer. Improving both significantly reduces the attractiveness of your plants as breeding sites without any chemical treatment.
Check that every pot in your collection has adequate drainage holes and that those holes are not blocked by compacted soil or sitting in water in a saucer. A pot sitting in standing water in a saucer keeps the bottom of the root zone permanently wet regardless of how carefully you water from above.
Increase air circulation around your plants by spacing them further apart, running a small fan nearby, or moving them to better-ventilated locations. Better air circulation dries the soil surface faster after watering and reduces the surface algae growth that shore flies specifically depend on as their primary food source.
Repotting plants with old, heavily decomposed potting mix into fresh well-structured mix also improves drainage dramatically. Old potting mix that has broken down loses its structural integrity and holds water far longer than fresh mix, creating the persistently damp conditions that fly larvae need.
Method 7: Use Beneficial Nematodes
Beneficial nematodes are microscopic roundworms that parasitize and kill soil-dwelling insect larvae, making them one of the most effective biological treatments for fungus gnat and fruit fly larval populations in indoor plant soil.
Steinernema feltiae is the species most effective against fungus gnat larvae and the one most widely recommended for indoor plant use. These nematodes are completely harmless to plants, humans, and pets, and break down naturally in the soil once the pest population is eliminated.
Purchase from Arbico Organics or Planet Natural, both of which ship live nematodes with instructions for indoor use. Mix with water according to package instructions and apply as a soil drench in the evening since nematodes are sensitive to UV light. Apply to moist soil and keep the top layer of soil slightly moist for 24 hours after application to help nematodes move through the soil actively in search of prey.
One application package typically treats far more soil volume than a standard home plant collection requires, making it cost-effective even for small collections.
For a complete guide to every beneficial insect and organism that works in an indoor plant environment, beneficial bugs for indoor plants covers every species with sourcing information and application guidance.
Method 8: Sand or Gravel Soil Topper
Placing a layer of coarse sand or fine gravel on top of the potting soil creates a physical barrier that makes it significantly harder for adult flies to reach the moist soil below for egg laying. The surface layer also dries out faster than potting mix, which creates an inhospitable surface zone for any eggs that are laid before the fly can reach deeper moist soil.
Apply a layer approximately half an inch to one inch deep of coarse horticultural sand or fine decorative gravel across the entire soil surface of affected pots. This depth is enough to deter most surface-laying flies while still allowing water to pass through freely during normal irrigation.
The barrier also has the aesthetic benefit of giving pots a clean, finished look that many plant owners prefer over exposed potting mix. It reduces the evaporative moisture loss from the soil surface, which means you need to water slightly less frequently, which itself reduces the soil moisture conditions flies require.
This method works best as a preventive measure and as a complement to soil treatment rather than as a standalone solution for severe active infestations.
Method 9: Clean Drains and Remove Fermenting Sources
If the flies near your indoor plants are true fruit flies or if treatment of the plant soil has not resolved the problem after two weeks, a fermenting organic source elsewhere in your home is almost certainly contributing to or driving the infestation.
Work through these potential sources systematically:
Kitchen and bathroom drains accumulate organic matter that ferments and provides ideal breeding conditions. Pour boiling water down every drain, follow with one cup of white vinegar, let sit for 30 minutes, then flush with cold water. For persistent drain fly breeding, enzyme-based drain cleaners like Bio-Clean break down organic matter without harsh chemicals and are safe for all pipe types.
Remove or refrigerate any overripe fruit, open containers of vinegar or wine, and vegetable scraps that may be sitting in accessible areas. Even a single damaged piece of fruit or a few drops of spilled juice provide enough fermenting material to sustain a fruit fly population.
Check recycling bins for residue inside bottles and cans. Rinse recyclables before adding them to the bin or empty the bin more frequently during warm months when fermentation speeds up.
Once fermenting sources outside your plants are eliminated, the adult fly population declines rapidly since their primary food and breeding resource has been removed. Combined with soil treatment for any larvae already present in your plant soil, this two-pronged approach resolves most mixed fruit fly and fungus gnat infestations within two weeks.

Building a Treatment Plan That Actually Works
The reason most fly treatment plans fail is that they address only one stage of the life cycle or only one potential breeding source. An effective plan needs to work on all of these simultaneously:
Adult flies: Yellow sticky traps, apple cider vinegar traps, neem oil spray on plant surfaces
Larvae in soil: Hydrogen peroxide drench, neem oil soil drench, beneficial nematodes, correct watering
Breeding conditions: Dry soil between waterings, sand or gravel topper, improved drainage and air circulation
External sources: Clean drains, remove fermenting food, refrigerate fruit
Running all four layers at the same time for a full three weeks produces results that any single method used alone cannot match. The three-week timeline is important because it covers the complete life cycle from egg to adult and ensures that each new generation emerging from surviving eggs encounters the treatment before it can reproduce and restart the cycle.
For understanding the full range of conditions that make indoor plants attractive to flying pests in the first place, do indoor plants attract bugs covers the environmental and plant health factors that drive pest attraction and what to change to make your collection significantly less hospitable to all pest species long term.
Conclusion
Getting rid of flies in indoor plants comes down to understanding that you are dealing with a two-stage problem that requires a two-stage solution. Adult flies are what you see and what annoys you. Larvae in the soil are what is producing the next generation of adults continuously. Treating only the adults you can see without treating the soil that is producing new ones every week is why so many people find themselves in the cycle of improvement followed by return.
Correct your watering immediately to remove the primary condition all three fly species require. Apply hydrogen peroxide drenching to kill larvae already present. Use yellow sticky traps to catch adults and monitor progress. Eliminate any fermenting food sources outside your plants. Keep treating for a full three weeks even when the adults seem to disappear, because the larvae they came from are still developing in the soil.
Those steps applied simultaneously and consistently clear the overwhelming majority of fly infestations from indoor plants within two to three weeks and the underlying moisture corrections keep them from coming back.
Frequently Asked Questions
What is the most common fly found near indoor plants?
Fungus gnats are the most commonly encountered flies near indoor plants in homes across the country. They are attracted specifically to moist potting soil and breed in the top few inches of potting mix, making any overwatered houseplant a potential breeding site. They are frequently confused with fruit flies but are slightly smaller, darker, more slender, and hover directly above soil surfaces rather than being attracted to fruit and fermenting food.
How do I tell if I have fungus gnats or fruit flies on my indoor plants?
Check where the flies are most concentrated. Fungus gnats hover directly above and around plant soil and fly upward when the pot is disturbed. Fruit flies are found throughout the kitchen and near fermenting food sources as much as or more than near plants. Look at the flies closely if possible: fungus gnats are slender and dark with a mosquito-like appearance, while fruit flies are stockier with distinctive reddish eyes and a more rounded body shape.
Can flies from indoor plants spread to the rest of my home?
Yes. Both fungus gnats and fruit flies move freely throughout a home and are not contained to the room where the infested plant lives. Fungus gnat adults do not cause direct harm in the rest of the home but are an annoyance everywhere they appear. Fruit flies are strongly attracted to any fermenting food source throughout the kitchen and home. Shore flies tend to stay closer to their soil algae food source but also spread between plant pots in a collection.
How long does it take to get rid of flies on indoor plants completely?
Most fly infestations on indoor plants are completely eliminated within two to three weeks of consistent treatment addressing all life cycle stages simultaneously. The three-week timeline covers the complete development cycle from egg to adult for all three common indoor plant fly species. Infestations caught early with soil drying and yellow sticky traps before larvae establish heavily sometimes clear within one week. Severe established infestations with heavy larval soil populations may take three to four weeks.
Is it safe to use hydrogen peroxide on indoor plant soil?
Yes, at the correct dilution of 1 part 3% hydrogen peroxide to 4 parts water. This concentration kills fly larvae on contact through oxidation without damaging plant roots. The peroxide breaks down rapidly into water and oxygen after application, leaving no harmful residue in the soil. Do not use higher concentrations or undiluted peroxide on plant soil since concentrations above 3% can damage fine root hairs even when diluted.
Why do I keep getting flies near my indoor plants even after treating them?
The most common reasons flies return after treatment are stopping treatment before the full three-week cycle needed to break the reproductive chain, a fermenting food source outside the plants that was not identified and eliminated, soil that is still staying too moist between waterings and continuing to provide breeding conditions, or a neighboring plant that was not treated simultaneously and is continuously resupplying the flying population. Address all four of these factors at the same time rather than repeating only the spray or trap component of the treatment.
Do fly infestations on indoor plants indicate unhealthy plants?
Fly infestations most directly indicate overwatered soil rather than unhealthy plants, though the two frequently go together since overwatering is also one of the most common causes of plant stress and decline. A healthy plant that is consistently overwatered will attract fungus gnats just as reliably as a stressed one. The presence of flies is most accurately a signal to review your watering practices rather than necessarily an indication that the plant itself is in poor health, though checking for other stress signs at the same time is always worthwhile.



