
Soil fly: How to get rid of it?
Identification, prevention and natural treatments
Contents
The fungus gnat, also known as sciarid or small black fly, is a common insect indoors or in greenhouses. While adults are not harmful, their larvae can impact the health of your plants. Fond of decomposing matter and developing in damp substrates, these unwanted sciarids can indeed cause stunted growth or even decline in young or fragile plants. They can also indirectly promote the development of diseases. What to do about these soil gnats? How to react when overrun by small black flies? Discover in this guide how to get rid of soil gnats with our tips for identification, prevention, and natural treatments.
Identify the compost fly
The compost fly, also known as the sciarid, is a small flying insect from the family of dipterans that is often found near green plants. As an adult, it measures less than 5 mm in length. It resembles a small black fly: its slender body is black, equipped with translucent wings, legs, and small antennae. The larva is a small translucent white maggot with a round black head.
The compost fly has a very short lifespan, lasting barely a week, which is why it quickly seeks to reproduce once it reaches adulthood. The female can lay between 50 and 300 eggs directly in the substrate of the plants. The eggs hatch after a few days. The emerging larvae will then transform into pupae before becoming adult flies. The complete cycle lasts approximately 6 weeks.
The larvae of these small flies feed on decomposing organic matter, which is not particularly harmful to the plants at first. However, they also have a nasty tendency to enjoy rootlets. These small, fine secondary roots resemble filaments and allow for the absorption of nutrients and water.
The peak of proliferation occurs in spring and summer, but can extend throughout the year indoors.

Sciarid (compost fly) adult or imago on the left and larva on the right
Symptoms and damage caused by the soil fly
While the adults of these small black flies pose no danger to plants, the larvae can inflict damage by feeding on the rootlets. The plant may then stop its growth, show signs of wilting and, ultimately, decline. Young plants with a still fragile root system are particularly and quickly vulnerable. Furthermore, the larvae can cause injuries, weaken the plant, and indirectly promote the development of cryptogamic diseases (fungi and bacteria).
The plants most sensitive to a sciarid attack are potted indoor or greenhouse plants, young shoots, or seedlings. A mature plant, well-established and healthy, will be less susceptible to the compost fly. This pest particularly enjoys warm, humid environments and cool soils rich in organic matter. Therefore, it is mainly the plants that thrive in moisture that are likely to be targeted.
If in doubt, inspect the plant’s substrate: the adults are visible on the surface and will fly away as soon as they are disturbed. They also tend to flutter around humans, attracted by the carbon dioxide released during breathing.
How to get rid of compost gnats in a nutshell
| Tips / Methods | |
|---|---|
| Prevention | |
| Good watering practices | – Wait for the substrate to dry on the surface (2 to 3 cm) before watering. – Prefer bottom watering (soaking for 30 minutes). – Use perforated pots to avoid stagnant moisture. – Empty saucers 20 minutes after watering. |
| Surface protection | – Install a mulch (bark, pumice, gravel, clay balls). – Prevents laying and development of larvae. |
| Substrate choice | – Avoid damaged bags of potting soil. – Use well-matured compost/manure. – Regularly remove dead leaves. |
| Natural repellents | – Essential oils of geranium, lemongrass, or cinnamon to diffuse. – Clove-studded lemon placed near plants. |
| Control in case of infestation | |
| Repotting | – Completely replace the infested substrate. – Clean the pot with water + black soap before repotting. |
| Natural traps | – Saucer with sweetened water, syrup, honey, vinegar, or wine to attract and drown flies. |
| Chromatic traps | – Yellow/orange sticky plates to trap adult flies. – Non-toxic solution, but non-selective. |
Prevention to combat compost flies
Good Watering Practices
Soil flies thrive in humid environments, which are necessary for the development of their larvae. For plants that do not require consistently moist soil, wait until the substrate has dried on the surface by 2 to 3 centimetres before proceeding with further watering.
You can also water from the bottom by submerging the container in a shallow pool of water for about thirty minutes, before allowing it to drain. This technique prevents the substrate from becoming wet on the surface.
Ensure to choose containers that are properly drained, allowing excess water to escape without the substrate remaining damp for too long.
Empty the saucers about twenty minutes after watering to avoid leaving stagnant water.
Surface Protection
Install a mulch at the base of your plants. In addition to reducing natural evaporation and limiting the growth of adventive plants (“weeds”), surface mulching will make it more difficult for flies to lay eggs in the substrate and will stop the development of larvae.
Opt for an organic mulch, for example, using pine bark for acidophilous plants or for decorative mulching with pumice, gravel, or clay balls in a thin layer.
Cover the surface of the substrate with a layer of clay balls to prevent flies from laying eggs in the soil
Choosing the Substrate
Be attentive when purchasing potting soil from stores and garden centres. Avoid poorly packaged or torn bags, through which flies can easily lay their larvae.
As adults are attracted to decomposing organic matter, always use well-matured compost or manure in your plants.
Regularly remove plant debris such as dead leaves without allowing them to decompose at the base of your plants.
Natural Repellents
Essential oils of geranium, lemongrass, or cinnamon are known for their insecticidal properties that may help repel unwanted pests, including small black flies. Place a few drops in a diffuser or on a tissue near the plants to keep soil flies away.
Similarly, a half lemon studded with a few cloves would have a repellent effect.
A few lemons studded with cloves to repel soil flies
Natural treatments to get rid of compost flies
Repotting
In the event of an infestation, the first thing to do is to replace the entire substrate of the plant to eliminate the eggs and larvae of these soil flies. Carefully remove as much material as possible surrounding the root system. Thoroughly clean the container using a solution of water and black soap, then repot the plant in healthy compost.
Natural Traps
Every gardener has their technique for trapping and attracting adult soil flies. Sugar is said to have the power to attract these unwanted pests. Simply place a saucer of water mixed with a bit of sugar, syrup, or honey next to the plant you want to protect. Lured in, the soil flies will drown. Vinegar and wine are said to have the same attractive properties.
Feel free to let us know if you have successfully tested any of these trapping methods!
Chromatic Traps
These insect traps come in the form of sticky plates. Yellow or orange in colour, they attract flying insects such as fungus gnats, which get stuck to the surface. This treatment has the advantage of being non-toxic and not using any pesticides. However, this solution is not very aesthetic and, importantly, it is non-selective: other non-harmful insects may also be trapped.
The bright colour of the sticky plates attracts soil flies that get stuck to them.
Diatomaceous Earth
Spread non-calcined diatomaceous earth on the surface of the pots or at the base of the plants to be treated. This multi-purpose natural rock, which comes in the form of an abrasive powder, is made up of tiny fossils and silica. This mechanical insecticide injures the pests, causing micro-cuts and total dehydration. The application should be renewed after each watering, as the effectiveness of diatomaceous earth diminishes when in contact with water or damp surfaces.
Biological Control
Biological control allows for the elimination or regulation of pests in an ecological manner, respecting the natural balance. It is based, for example, on the use of beneficial insects, natural predators of the pests.
Against soil flies, use nematodes (known in our case as Steinernema feltiae). Non-toxic to plants, they will act quickly and effectively: these tiny roundworms will parasitise and kill the larvae within a few days.
In practice, these beneficials will simply be diluted in the watering water. Be sure to follow the manufacturer’s instructions regarding the dosage to use.
This treatment can be used both in open ground and in pots and greenhouses. It should be applied at the beginning or end of the day, out of direct sunlight.
Finally, if the presence of spiders does not bother you, feel free to welcome them into your home. True natural insecticides, they will happily trap unwanted adults in their webs.
For further reading: “Biological Control, Beneficial Nematodes: How to Use Them Properly.”
- Subscribe!
- Contents


Comments