Joshua 23:5

5 The Lord your God will force them back on your account and drive them out before you, so that you can take possession of their land, as the Lord your God promised you.

Joshua 23:5 Meaning and Commentary

Joshua 23:5

And the Lord your God he shall expel them from before you
That is, such of them as yet remained among them:

and drive them from out of your sight;
the same thing expressed by different words, for the confirmation of it:

and ye shall possess their land, as the Lord your God hath promised
unto you;
all which is to be understood on condition of their good behaviour towards the Lord, and obedience to his commands; by which tenure they held the possession of the land when put into it, and for their disobedience did not possess the whole.

Joshua 23:5 In-Context

3 and you have seen for yourselves everything the Lord your God did to all these nations on your account, because it was the Lord your God who was fighting for you.
4 See, I have allotted these remaining nations to you as an inheritance for your tribes, including all the nations I have destroyed, from the Jordan westward to the Mediterranean Sea
5 The Lord your God will force them back on your account and drive them out before you, so that you can take possession of their land, as the Lord your God promised you.
6 "Be very strong, and continue obeying all that is written in the book of the law of Moses, so that you do not turn from it to the right or left
7 and so that you do not associate with these nations remaining among you. Do not call on the names of their gods or make an oath to them; do not worship them or bow down to them.
Holman Christian Standard Bible ® Copyright © 2003, 2002, 2000, 1999 by Holman Bible Publishers.  Used by permission.  All rights reserved.