Like outdoor plants, indoor plants can be bothered by insect pests. In fact, it is quite common for insects to enter your home and take up residence on a houseplant. Gnats are one of the most common types of indoor plant insect pests. They often swarm around the plant in a little cloud, rising up to annoy you when you touch or otherwise disturb the plant. If not dealt with in a timely manner, they can quickly spread to other, nearby plants.
Remove the plant from other indoor plants so that it is isolated. This will prevent any of the adult gnats from moving to a safe haven.
Take the plant outside and hit it with a blast of water, if it is not a fragile indoor plant. This will knock many of the adult gnats right off the plant.
Place yellow sticky traps near the plant. These are designed to trap and kill the adult gnats. The adult gnats don't actually harm the plant, but they will continue to lay eggs unless you kill them. Place the traps on the surface next to the plant. If your plant is very tall, use a paper clip to attach the sticky trap (which is similar in size and shape to an index card) to some of the foliage at the top of the plant.
Place a slice of raw potato on top of the soil to check for the presence of gnat larvae. They will chew on the potato if they are living in the soil. Gnat larvae feed on the roots of indoor plants, damaging their ability to intake nutrients and moisture.
Let the top layer of soil dry out between waterings down to an inch or two. This will kill off much of the larvae, which need moist soil to thrive. Do not let water sit in the tray underneath the plant.
Remove plant debris, such as dead leaves, from the soil. Larvae also feed on decaying organic material.
Place a half-inch of sand on top of the soil. This will dry out the soil and suffocate the larvae as well.
Drench the soil with an insecticide, but because this can harm some indoor plants, do this step only as a last resort.