Yet, there's a simple solution. Fortunately, there are ways to get rid of gnats, and keep house plants indoors.Purchase a safe garden and fruit insect killer. If necessary, place new soil in the pot.Spray window sills and doors with an insect killer.