Fungus gnats are tiny insects that lay eggs in moist potting soil and are usually visible flying around inside the house, office or apartment where indoor plants are located. They can be highly irritating and embarrassing if your houseplants become infested because they are difficult to control. The maggots or baby fungus gnats consume decaying organic matter in the top layer of soil and also feed on the tiny roots of the indoor plants. The maggots develop into the flying gnats and the cycle begins again. The best way to control the gnats is to keep the top inch of the potting soil dry and replace infested soil.
Choose a nice day to work outside and bring all indoor plants outside to work, if possible.
Remove each plant from old potting soil and wash off the roots of the plants, removing as much potting soil as possible from the root system. Use a tarp or newspaper to catch old potting soil. Submerge roots of plant in bucket of water and leave for two hours. Be sure all the roots are covered with water to drown the maggots or flush them out. Then, wash all flower pots with detergent and rinse well. Get rid of all the old potting soil. Do not unseal the new potting soil until ready for use.
While plants are soaking to kill the maggots, go inside and spray an organic or chemical insecticide that kills flying insects indoors wherever you have seen the gnats including the area where you keep your plants. An indoor flying insect spray is available at most larger supermarkets. Look for pyrethrin as the active ingredient in organic sprays. Most indoor flying bug sprays are contact sprays, so be thorough while spraying. Read all warnings on the label carefully.
Take plants from buckets where they were soaking and wash off the roots again to remove any more maggots or eggs you may have missed the first time.
Unseal new potting soil and repot plants. Fertilize plants with a water soluble fertilizer diluted to half strength, let drain and move inside immediately. If possible, water plants in the future by letting them sit in the bathtub or sink and soak water up from the bottom so the top one-inch layer of potting soil remains dry.