Joshua 23:5
And the LORD your God, he shall expel them from before you, and drive them from out of your sight; and ye shall possess their land, as the LORD your God hath promised unto you. And the LORD your God, he shall expel them from before you, and drive them from out of your sight; and ye shall possess their land, as the LORD your God hath promised unto you.
The promise was spoken in Joshua's address to Israel after the Lord had given the people rest from their enemies, when he called its leaders and people together to speak to them. It declares that the Lord Himself would expel the remaining Canaanite nations still occupying the promised land from before Israel and drive them from sight, so that Israel would possess their land as He had promised. Completing the conquest seemed difficult and uncertain to the people, who regarded renewing the campaign as hard. In view of that difficulty they were not to settle into ease.
On the strength of this assurance Israel could trust God to complete the expulsion and was called to be courageous in obeying the law of Moses. The Lord's faithfulness to fulfill His promise to give the land shows His faithfulness to carry out His warnings as well, so that departure from Him would bring desolation.