He expelled the male shrine prostitutes from the land and got rid of all the idols his ancestors had made.
OJBAnd he removed kedeshim (the male and female cult prostitutes) out of HaAretz, and got rid of kol hagillulim (all the idols) that his avot had made.
T4THe got rid of the male prostitutes that were at the places where the people worshiped idols, and he also got rid of all the idols that his ancestors had made.