Small Worms On Top Of Soil

Q: While watering my Meyer lemon tree I found a lot of small worms
crawling on top of the soil. How can I eliminate? 

A: I think you are seeing the larvae of dark-winged fungus gnats. They live in
very moist potting soil, feeding on fungus that grows there. To confirm my
diagnosis, cut a 1/4 inch thick disk of Irish potato and place it on the soil
surface. Fungus gnat larvae will collect on the underside of the potato. They
are tiny worms with a distinct dark head. Sprinkle a one-half inch layer of dry
sand on top of the potting soil. This will immediately discourage gnats from
laying their eggs. In the future, water your lemon only when the soil feels dry.