“And when יהוה your Elohim gives them over to you, you shall smite them and put them under the ban, completely. Make no covenant with them, and show them no favour.
As יהוה had commanded Mosheh his servant, so Mosheh commanded Yehoshua, and so Yehoshua did. He did not turn aside a word of all that יהוה had commanded Mosheh.