Source · the work in full

Rashi on the Former Prophets

CC BY · The Metsudah Tanach series (Metsudah Publications, Lakewood, NJ)
Chapter 13

Joshua 13

A great deal of the land remains— Of the land I promised to Avrohom, much remains to be possessed [as an inheritance], for it has not been conquered.

Borders. Marche in old French.

From Shichor. This is the Nile River, which is also referred to as the Egyptian brook. It is close to the southwestern border of Eretz Yisroel, as it is said in Parshas, “These are the journeys.” From here we learn that in Yehoshua’s lifetime, he did not conquer the entire southern border except from the wilderness of Tzin, which is synonymous with the bare, divided mountain that goes up to Seir; to the Nile. This is the boundry of Gaza mentioned above, “From Kodeish-Barneia to Gaza.
To the border of Ekron, to the north. The Ekronites lived near the Sea, and they spread out northward further than the others.
Which is considered the territory of Canaan. It is of the land of Canaan that I gave to Avrohom [as an inheritance].
The territory of the five Philistine rulers. This is the territory from the end of the border to the Great [Mediterranean] Sea, westward.
The Azites, the Ashdodites, the Ashkelonites. There are six rulers counted in the verse and he previously called them five [rulers]. Said Rav Yochanan, “Five of them were prominent. There were five prominent rulers [that were counted], for the Avites were not counted among the prominent rulers. It can be explained in an other way: The five Philistine rulers were: the Azites, the Ashdodites, the Ashkelonites, the Gittites, and the Ekronites. These are the five [rulers mentioned]. The land of the Avites remained unconquered for they were not of the Philistine people.

From the south, all the land of Canaanites. The preceding verse described the southern border going from east to west, and this verse describes the width of that area that remained to be conquered; describing how much there was from south to north.
From the south, all the land of the Canaanites. From the south which is Gaza belonging to the Sidonites, to Apheik, to the Emorites.

The land of the Givlites and the entire Lebanon eastward foward the rising sun. And on the eastern border, the northern end remained unconquered, [including] the entire Lebanon, from Baal-gad, to the end of the border; and in the width from east to west to Levo-Chamos. This is the entire northern border, for Levo-Chamos is at the northwestern corner, as stated in Parshas “These are the journeys.”

I will evict them— after your death.
Cast lots to divide it as an inheritance to Bnei Yisroel— and later they will conquer, each tribe [will conquer] that area which fell in its lot.

With him, the tribes of Reuvein and Gad. With the first half of the tribe of Menashe, the tribes of Reuvein and Gad took their inheritance.

From Aroreir, which is on the bank etc. He procedes to describe the entire land on the other side of the Jordan. Then he explains the boundry of each tribe; [as stated], “And Moshe gave”—i.e., he gave to each tribe [their territory].

From the remnant of the giants— who were slain by Kedorlaomeir and the kings who were aligned with him, as it is said, “And they struck the Rephaim in Ashteros Karnayim.”

On the Mountain of the valley. The mountain of the plain.

And half the land of the Bnei Amon. Half the land they conquered from the Bnei Amon and from Sichon.

The Jordan and its border. The Jordan and its boundary, [including] the cities which are on its bank.

The cities and their villages. Referring to cities surrounded by walls.
And their villages. The open cities without walls.

You arrive at the cited line; the whole work is yours to read around it. The text is set from the cited public-domain edition.