Answer: It's unusual to have soil dwelling pests such as worms and small insects in houseplant potting soil, with the exception of fungus gnats. These little pests feed and breed in moist organic matter. Covering the top of the soil with sand, decorative aquarium gravel or even a temporary covering of plastic wrap will stop the pests from breeding and will eliminate the population. If you're not dealing with fungus gnats but with other pests, the best way to control them is to repot your plants using fresh potting soil. As you unpot them, brush away as much of the old potting soil as possible from the root system so you remove the critters plus their eggs. Then repot in fresh potting soil and you shouldn't have any more problems.
Best wishes with your houseplants.
Q&A Library Searching Tips