As I learned the hard way, compost can sometimes go horribly wrong and bring guests to your plants you never wanted to see. If you’ve reached here reeling in horror after seeing your precious potted plant wilting even as maggots crawl in its soil, it is not so difficult to fix this.
Stop watering the plant infected by fungus gnat larvae
You want the top layer to dry out. Fungus gnat larvae are delicate for all the havoc they wreak and die easily in dry soil. The maggots complete their life cycle outside the soil, as the fungus gnats. Dry soil does not appear to be a good place to lay eggs to the adults. Don’t worry, a few days without water ewon’t kill your plant. This will prevent more eggs from being deposited, and prepare your container for the next step.
Water with diluted hydrogen peroxide
A week after you have stopped watering your plants (or less, if your soil goes dry before that – but not just looks dry, actually feels dry at least a 4-5 inches in), dilute hydrogen peroxide with three times the quantity in water. So for a cup of hydrogen peroxide, you want three cups of water. Use this to water your now dry container plant. The hydrogen peroxide will fizzle and degrade into oxygen and water – both of them not harmful to your plant, but will kill the maggots on contact.
Repeat the above two steps
Repeat the above two steps till you no longer find maggots. You can also test for the maggots by putting half a potato face down in the container (no need to bury). If there are maggots, you’ll find them at the potato in a few hours. Dispose of the potato and repeat the above two steps. If you don’t find the lrvae, you are home free.
Add gravel or sand as a top layer in your container.
Add a layer of gravel or sand on top of your potting soil/mix to prevent the gnats from seeing the container as a suitable breeding ground to begin with. Also be sure to replace the (removed) gravel or sand after adding compost or fertilizer to make sure the compost doesn’t attract flies.
Use fly traps
Trap fungus gnats with some yellow sticky paper or bowl with apple cider vinegar or any other fly trap to prevent infections. Catching houseflies too will prevent their infestations.
Call it a lesson learned – Avoid bone meal or some other fertilizers
Some fertilizers attract flies more than others. If after exposing it to air, you have a buzz of interested flies instantly, last thing you want is to put it in your container. Bone meal in particular seems to attract flies a lot.
This should be it.