Deuteronomy 13:17

13:17 You must not take for yourself anything that has been placed under judgment. Then the Lord will relent from his intense anger, show you compassion, have mercy on you, and multiply you as he promised your ancestors.

Deuteronomy 20:17-18

20:17 Instead you must utterly annihilate them – the Hittites, Amorites, Canaanites, Perizzites, Hivites, and Jebusites – just as the Lord your God has commanded you, 20:18 so that they cannot teach you all the abhorrent ways they worship their gods, causing you to sin against the Lord your God.