How to Get Rid of Flies in Houseplants Without Killing Them

Jennifer Jones

Written By, Jennifer Jones

Updated on 14 Aug., 2026

How to Get Rid of Flies in House Plants
AI Generated Image: Intrigue House

Table of Content

    If you see pesky black flies everywhere around your houseplants, there are chances of fungus gnats in the soil. They cause trouble for every gardener, whether a professional or a beginner. This issue should be addressed immediately because, if left unchecked or untreated, they’ll multiply and swarm the other indoor plants, too. Though they do not pose a risk to human health, they can disrupt plant growth and impair plant health.

    Before you start with the elimination treatment, understand what attracts these flies to the houseplants. Once you know the reason, getting rid of them becomes much easier. So, this blog will guide you with everything you need to know about fungus gnats, how to prevent them, and how to get rid of them for good.

    What are Fungus Gnats or Flies?

    The fungus gnats (or flies, in simpler terms) do not refer to only one species. It is a common name for many different species of very small flies that belong to the superfamily Sciaroidea. The baby flies live in the soil and feed on fungi and decaying organic matter; hence the name fungus gnats.

    There are several types of flies (fungus gnats), all more or less similar -

    • They are usually about 0.2 inches long.
    • They look like small mosquitoes and are skinnier than fruit flies.
    • They fly slowly and are often seen walking over the plants and soil.
    • They only live for two weeks or so; hence, they are short-lived.

    Fungus gnats are beneficial for promoting soil health and aiding decomposition. However, the adults can be a nuisance, as they lay eggs on the soil of the houseplant, which may infest other houseplants as well. Baby gnats can also eat organic material and plant roots, causing the plant to weaken over time. When the roots become weak, they become more susceptible to damage and bacteria, allowing pathogens to wreak havoc.

    The Life Cycle of the Flies (Fungus Gnats)

    Fungus gnats usually lay their eggs while looking for food sources (fungus). The eggs hatch quickly, and the young flies feed on the fungus. They grow into adult flies, leave the area, and find a mate to reproduce. These gnats do not care about inbreeding and can mate with closely related members of the family.

    Each female can lay a huge number of eggs, around 200-300 eggs at a time. Also, they live only for about 10 days. As they produce a ridiculously large number of flies at a time, a small number of flies can become an infestation if not treated properly.

    How Do Fungus Gnats Get in Your Home?

    A Vibrant Yellow, Star-shaped Sticky Trap, Heavily Covered With Numerous Tiny Black Fungus Gnats
    AI Generated Image: Intrigue House

    Fungus gnats, or flies, are always around. They might be present in the potting soil you have purchased from the local nursery. You may even accidentally bring gnats indoor by using soil from your own garden to pot a new plant that might already be infested with them.

    Sometimes, you may also bring a gnat-infested plant indoors. These flies may leave that plant and lay eggs in the soil of your other houseplants. The most convenient way they can invade your home is by flying on their own. Adult flies can infest the plant inside the home by laying eggs in moist soil, multiplying in number.

    Why Do Flies Attract to Houseplants?

    What attracts flies to the houseplants? Here are some factors that may attract them to infest your houseplants.

    Moisture and Humidity

    Damp soil can increase humidity, which is a problem for both the soil and the plant.

    • First, it makes the perfect breeding ground for the gnats. Moist soil ensures that maximum eggs are hatched.
    • Second, moist soil can promote fungal growth, which serves as a food source for baby gnats.

    Now, fungal spores are everywhere in the air, but they do not grow unless they land in a suitable place, which could be a damp, cold, and dark place filled with organic matter like roots and microbiomes.

    Dead Leaves and Plant Debris

    Anything organic, such as rotten roots or leaves, is a food source for fungus. If you leave dead leaves or plant debris lying around in the pot, it can lead to fungal growth in the soil. It is best to clean up the dropped leaves and use fresh soil for your houseplant to reduce the risk of fungus growth.

    Overwatering

    As mentioned above, the flies are attracted to the moist soil. So, if you are overwatering your plants, these flies might find the damp soil, lay eggs, and start multiplying.

    8 Effective Ways to Get Rid of Flies (Fungus Gnats)

    If you are dealing with fungus gnats, there is not much to worry about, as they are not much of a damage-causing insect. It’s the mealy bug and spider mite infestation you must be worrying about. However, because they can slowly weaken the plant, you must take appropriate measures to eliminate them.

    It is easy to get rid of flies if you target both adults and larvae. Here are some trusted methods to get rid of flies -

    Adjust the Watering Schedule

    Water Cascades Gracefully From the Pitcher's Spout, Arcing Downwards Into the Rich, Dark-brown, Moist Soil of a White, Cylindrical Plant Pot.
    AI Generated Image: Intrigue House

    Overwatering is a common mistake among gardeners, as it keeps the soil moist. If you want to get rid of gnats from the houseplant, reduce the watering frequency. Since fungus gnat eggs mostly hatch in moist soil, when the soil is dry, they have no chance of survival. This is because dry soil makes the atmosphere inhospitable, thus reducing the number of flies.

    Make sure the topsoil (a few inches of soil) is completely dry before you water again. The most important thing to consider is that the pot should have a good drainage hole, and the potting soil should also be well-draining. Also, check if the plants are getting enough light. If not, they won't be able to use the water, causing the soil to stay damp for an extended period. Place the planters near the window that receives ample sunlight (depending on the plant’s lighting requirement).

    Cover the Bare Soil

    The Soil Surface is Meticulously Covered With Numerous Smooth, Highly Polished Black River Rocks, Reflecting Subtle Glints of Light
    AI Generated Image: Intrigue House

    Covering any bare soil with pebbles, marbles, shells, aquarium gravel, or other decorative stones can help prevent fungus gnats from laying their eggs. Usually this is done with cactus and succulents, but it can work for almost all other potted plants. However, with this method, you need to be careful with the watering schedule.

    The soil covering can cause slow evaporation, leaving the soil moist for longer. Checking the moisture of the covered soil is also difficult. Even so, it is worth trying if you have flies buzzing all over your houseplant.

    Sticky Fly Trap

    A Bright Yellow, Butterfly-shaped Sticky Trap, Heavily Laden With Hundreds of Tiny Black Fungus Gnats Stuck to Its Shiny Surface
    AI Generated Image: Intrigue House

    A sticky fly trap does not resolve the underlying issues, but it can help reduce the number of gnats flying around. If you have smaller planters, you can place one sticky trap in each. Whereas, for large planters, place 2-3 sticky traps. This can help catch newly hatched flies that crawl out of the soil. This prevents them from laying eggs and continuing the cycle.

    Potato Slices

    The Potatoes Rest on Rich Potting Soil, Densely Textured With Dark Brown Organic Matter, Small Bright White Perlite Particle
    AI Generated Image: Intrigue House

    Potato slices help you gauge how severe the infestation is while also getting rid of some of the larvae. Cut a potato into roughly 1-inch pieces, place them just under the soil, and leave them for at least 4-8 hours. When you remove the slices, you can get an idea of the extent of infestation. The more larvae, the heavier the infestation.

    Throw away the larvae-crawling potato slices to get rid of the larvae from the houseplants. But it should be noted that each potato slice can remove only a few dozen larvae at a time. This is because an adult gnat can lay 200-300 eggs at a time, which can be quite challenging to remove with this method alone.

    Hydrogen Peroxide

    A Person Holding and Pouring the 'Hydrogen Peroxide' Into the Dark, Rich Soil of a Lush, Vibrant Green Potted Plant
    AI Generated Image: Intrigue House

    As it turns out, using hydrogen peroxide solution is also an effective way to get rid of fungus gnats. It disrupts their lifecycle and kills even the infant flies.

    Hydrogen peroxide is available in any high-street pharmacy or can be bought online. Use hydrogen peroxide by -

    • Mixing 1 part of hydrogen peroxide with 6 parts of water.
    • Drench the soil with the solution; however, before using the hydrogen peroxide, ensure the soil is properly dry.
    • When you pour the solution, it will fizz for about 30 seconds, and the hydrogen peroxide will break down into water and oxygen, which is beneficial for your plants.

    Although it effectively kills the larvae, it may not eliminate the entire gnat population.

    Food-Grade Diatomaceous Earth

    A Polished Stainless Steel Sieve, Filled With Fine, Bright White Diatomaceous Earth Powder, Directly Over a Vibrant Garden Bed
    AI Generated Image: Intrigue House

    Diatomaceous earth (DE) is a fine powder made from fossilized shards and shreds of tiny aquatic organisms called diatoms. The particles are abrasive and can damage the larvae and the gnats upon contact. It is best to buy food-grade DE made only for plants.

    You can sprinkle the powder on the soil surface or mix it into the soil mix when repotting. It shows good results within a week and helps eliminate both larvae and gnats.

    Dish Soap Solution

    A Small, Circular, Light-brown Unglazed Terracotta Saucer on Which Numerous Minuscule, Dark Fungus Gnats Are Present: Several Hover
    AI Generated Image: Intrigue House

    A dish soap solution can help minimize the number of fungus gnats flying around the indoor plants. To make the solution -

    • Mix 100ml of warm water with 2 teaspoons of sugar.
    • Add 2 tablespoons of apple cider vinegar or fermented drinks.
    • Add 6 drops of dish wash liquid.
    • Place the container with the mix somewhere outside. This will attract the flies, and when they land on the dish soap, it will become really challenging for them to fly away.

    Mosquito Dunks

    The Light Brown Dunk, Speckled With Organic Matter, Rests Subtly Off-center in the Tranquil Water
    AI Generated Image: Intrigue House

    Mosquito dunks are small, disc-shaped devices used in standing water, such as birdbaths. When they dissolve, they release a bacterium that is poisonous to mosquitoes and fungus gnats. To use the dunk, break and crumble the disc into the watering can and allow it to sit overnight before watering the plant.

    Note Sticky trap catches and get rid of adult gnats, while the mosquito dunks can kill the gnats at an early stage of their life.

    How to Prevent a Fungus Gnat Infestation?

    Once your plants are gnat-free, you must ensure you take proper measures so that the gnats do not return. Here are some prevention tips you can follow to keep your plants healthy and free from the pesky pests -

    Water Less

    Controlling the soil moisture can help prevent gnat infestation. The best way is to water the soil until it gets completely dry. However, watering frequency depends on factors such as lighting, temperature, and soil composition. However, when watering a water-loving plant, such as maidenhair fern, which prefers consistent moist soil, don't wait for the soil to dry out completely.

    Soil Aeration

    Fungus gnats are moisture-loving pests and dwell in dense, compacted soil, whereas houseplants like loose, well-aerated soil, which allows excess water to drain and help the oxygen reach their roots.

    So, when you keep the soil in the pot aerated, gnats won’t find it suitable for laying their eggs and multiplying. Here are some of the ways you can keep your indoor plants aerated -

    • Instead of using pure potting soil, add a minimum of 20% larger, looser particles like perlite or orchid bark.
    • Use a chopstick to poke the soil and give it a whirl. This creates air pockets and allows water to penetrate deeply into the soil, while draining it completely and easily.
    • Consider repotting the plant every 1-2 years, as soil gets compacted when overly decayed.

    Regular Plant Care

    Make sure the plants inside the home are healthy. This reduces the risk of infestation. Feed your plant the right fertilizer and prune it occasionally to maintain good health and ensure there are no leaves or debris. These steps reduce the growth of fungus, which keeps the flies at bay.

    Conclusion

    When you are trying to get rid of houseplant flies, consider taking several approaches. For example, you can water the plant less and sprinkle diatomaceous earth powder or cinnamon powder over the soil. Using multiple approaches can ensure that the fungus flies doesn't lay eggs. This reduces the number of larvae and also kills adult gnats.

    FAQs

    What Causes Flies in Houseplants?

    Moist soil, leaves and other plant debris lying around, organic matter-rich potting soil, etc., can cause flies in houseplants.

    Will Flies in Houseplants Go Away on Their Own?

    Fungus flies, or fungus gnats, rarely go away on their own. Till there is moist or wet soil, these pests tend to stick around, lay eggs, and continue multiplying. However, there are several ways you can get rid of them.

    Can Overwatering Cause Flies in Houseplants?

    Yes. Flies love moisture-laden soil, and when you overwater the plant, it keeps the soil soggy, which makes it the perfect breeding ground for flies to thrive.

    Do Sticky Traps Eliminate Fungus Gnats Completely?

    Sticky traps might help eliminate the adult gnats, but not completely. However, for larvae, you can use diatomaceous earth.

    How Can I Prevent Flies From Coming Back to My House Plants?

    Let the soil dry completely before watering and maintain the health and hygiene of the plant. This ensures that they do not return.

    How Do You Kill Flies Without Killing Plants?

    You can use apple cider vinegar, sticky traps, a dish soap mixture, etc., to kill the flies. These home remedies won’t harm the plants.

    How to Get Flies Away From Houseplants?

    Treat the soil with mosquito dunks. This keeps the mosquitoes away, and it works for the fungus gnats as well.

    Can I Use Vinegar to Kill Plant Flies?

    Yes. Apple cider vinegar works best for fungus gnats. It should be noted that pouring ACV directly on the plant is not recommended.
    Newsletter Tree

    Subscribe to our Newsletter, Get the latest updates.

    Read More Stories