Do not let worldliness remain among you

Compromises with the enemy lead to idolatry

And the Canaanites who were living in Gezer were not forced out; but the Canaanites have been living among Ephraim, to this day, as servants, doing forced work.
Joshua 16:10

1)Num 33:52 See that all the people of the land are forced out from before you, and put to destruction all their pictured stones, and all their metal images, and all their high places:
Num 33:53 And take the land for yourselves, for your resting-place: for to you I have given the land as your heritage.
Num 33:54 And you will take up your heritage in the land by the decision of the Lord, to every family its part; the greater the family the greater its heritage, and the smaller the family the smaller will be its heritage; wherever the decision of the Lord gives to any man his part, that will be his; distribution will be made to you by your fathers’ tribes.
Num 33:55 But if you are slow in driving out the people of the land, then those of them who are still there will be like pin-points in your eyes and like thorns in your sides, troubling you in the land where you are living.

Deu 7:1 When the Lord your God takes you into the land where you are going, which is to be your heritage, and has sent out the nations before you, the Hittites and the Girgashites and the Amorites and the Canaanites and the Perizzites and the Hivites and the Jebusites, seven nations greater and stronger than you;
Deu 7:2 And when the Lord has given them up into your hands and you have overcome them, give them up to complete destruction: make no agreement with them, and have no mercy on them:
Deu 7:3 Do not take wives or husbands from among them; do not give your daughters to their sons, or take their daughters for your sons.
Deu 7:4 For through them your sons will be turned from me to the worship of other gods: and the Lord will be moved to wrath against you and send destruction on you quickly.
Deu 7:5 But this is what you are to do to them: their altars are to be pulled down and their pillars broken, and their holy trees cut down and their images burned with fire.

   [ + ]

1.Num 33:52 See that all the people of the land are forced out from before you, and put to destruction all their pictured stones, and all their metal images, and all their high places:
Num 33:53 And take the land for yourselves, for your resting-place: for to you I have given the land as your heritage.
Num 33:54 And you will take up your heritage in the land by the decision of the Lord, to every family its part; the greater the family the greater its heritage, and the smaller the family the smaller will be its heritage; wherever the decision of the Lord gives to any man his part, that will be his; distribution will be made to you by your fathers’ tribes.
Num 33:55 But if you are slow in driving out the people of the land, then those of them who are still there will be like pin-points in your eyes and like thorns in your sides, troubling you in the land where you are living.