Q.pest control for indoor plants
My 4 foot pm plant was infested with small gnat like insects. I tried a gentle pest control spray but was ineffective..seems like the little critters waited in the soil until the coast was clear. I put the plant out on patio then the gnats started flying around other parts of the house. My husband removed all the soil, rinsed off the plant and roots, cleaned the pot and replanted the palm in fresh soil. How can I keep the gnats from coming back?

White Fly or Gnats can generally be controlled with Neem Oil.
You can also use sticky traps.
Here are some links with more information.
https://www.gardeningknowhow.com/plant-problems/pests/insects/control-whiteflies-houseplants.htm
https://www.gardeningknowhow.com/plant-problems/pests/pesticides/neem-oil-uses.htm