Fungus gnats are from too much moisture in the soil. I just dealt with this about 2 months ago. Honestly you may never totally get rid of them but can easily very well control them. I did all sorts of sprays at the detriment of my plants before I learned that a 1/2 inch of sand on top the soil, and some mosquito dunks works best. I will still see a random gnat here and there, but never more than 2 at a time. Before there would be more every day.