Fungus gnats are tiny, mosquito-like flies that love the moist potting soil and decaying plant material of houseplants.
The best defense is a good offense. Avoid over-watering your houseplants or leaving them in pots without drainage holes. This excess moisture attracts the adult fungus gnats, which lay their eggs in the wet soil
Allow the soil to dry between regular watering. Don’t dry out your plant to the point of wilting; just ensure that the soil isn’t always moist. Short of attracting the adult gnats, if a few eggs do show in the pot, let the soil dry out occasionally. Doing this should kill the eggs and larvae. Remember to drain any excess water that may have accumulated in the pot’s saucer.
As you care for your plant, it is a wise practice to periodically go through and clean out the dead leaves or debris that sometimes lay at the base of the plant.
You can treat your plant with Neem oil by drenching the soil at the very first sign of a fungus gnat. Allow the soil to dry out for a few days so the top couple of inches of soil is dry. Dilute the Neem oil with water per manufacturer’s directions and directly drench the soil at the roots of the plant. Spray down the entire plant as well as any other houseplants you have in order to keep the adult gnats at bay. Neem oil won’t kill all of the pests on contact, so it might take a few days, weeks or even months for all of the bugs to disappear from the plant.
If you see a lot of little gnats, you probably have too many in your soil for the Neem oil to wipe them out. At this point, the best plan is to repot your plant. Remove your plant from its old pot and toss all the old soil. Carefully, dust of as much soil off of your plant as possible. Clean your pot with a 1:1 ratio of bleach to water. Make sure you rinse and dry the pot well before you repot. Lastly, repot using all new soil, and let the plant settle in its new pot a bit before you do a preventative spraying of Neem oil.