Joshua 10:30-41

ISV(i) 30 The LORD gave both it and its king into the control of Israel, and Joshua executed both its king and every person in it with swords, leaving no survivors. He dealt with the king the same way he had dealt with the king of Jericho.
31 Then Joshua and all of Israel passed from Libnah to Lachish, camped near it, and attacked it. 32 The LORD gave Lachish into the control of Israel, and Joshua captured it the next day. He declared war on the city and executed everyone in it, the same way he had treated Libnah.
33 Then Horam king of Gezer appeared to help Lachish. So Joshua attacked him and his army, until he left no one remaining. 34 After this, Joshua, accompanied by all of Israel, proceeded from Lachish to Eglon, laid siege to it, and attacked it. 35 They captured it on that day, attacking it in battle. Then Joshua completely destroyed it that day, the same way he had dealt with Lachish.
36 Then Joshua, accompanied by all of Israel, left Eglon for Hebron, where they attacked it, 37 captured it, and executed its inhabitants—its king, all of its cities, and every person in it, leaving no one remaining, the same way he had dealt with Eglon. He completely destroyed it, along with everyone in it.
38 Then Joshua returned, accompanied by the entire fighting force of Israel, to Debir, where they attacked it, 39 captured it, its king, and all of its villages. They executed them, totally destroying it and everyone in it, leaving no one remaining. He dealt with Debir and its king just as he had dealt with Hebron, treating them the same way he had dealt with Libnah and its king.
40 So Joshua conquered the entire land, the hill country, the Negev, the Shephelah, and the wilderness highlands, along with all of their kings. He left none of them remaining, but completely destroyed every living person, just as the LORD God of Israel had commanded. 41 Joshua conquered them from Kadesh-barnea to Gaza, including the entire territory of Goshen as far as Gibeon.