Deuteronomy 12:2

12:2 You must by all means destroy all the places where the nations you are about to dispossess worship their gods – on the high mountains and hills and under every leafy tree.

Deuteronomy 20:20

20:20 However, you may chop down any tree you know is not suitable for food, and you may use it to build siege works against the city that is making war with you until that city falls.