Deuteronomy 20:16-20 - Laws Concerning War With Canaanite Nations
16 However, you must not let any living thing survive among the cities of these people the Lord your God is giving you as an inheritance. 17 You must completely destroy them—the Hittite, Amorite, Canaanite, Perizzite, Hivite, and Jebusite—as the Lord your God has commanded you, 18 so that they won’t teach you to do all the detestable things they do for their gods, and you sin against the Lord your God.
19 “When you lay siege to a city for a long time, fighting against it in order to capture it, you must not destroy its trees by putting an ax to them, because you can get food from them. You must not cut them down. Are trees of the field human, to come under siege by you? 20 But you may destroy the trees that you know do not produce food. You may cut them down to build siege works against the city that is waging war against you, until it falls.