If you change to new, clean soil and clean pots, repotting can help get rid of the moldy environment. To stop it from happening again, make sure the new setup has better drainage and air flow.