This is how you are to treat all the cities that are very far from you, which do not belong to the nations nearby.
In context
13and when Yahweh your God delivers it into your hand, strike down every male in it with the sword. 14But the women, the children, the livestock, and everything else in the city — all its plunder — you may take for yourselves. You may enjoy the plunder of your enemies that Yahweh your God has given you. 15This is how you are to treat all the cities that are very far from you, which do not belong to the nations nearby. 16But in the cities of the peoples Yahweh your God is giving you as an inheritance, do not leave anything alive that breathes. 17You must devote them to complete destruction — the Hittites, Amorites, Canaanites, Perizzites, Hivites, and Jebusites — as Yahweh your God has commanded you,