Midrash sur Le Deutéronome 20:20: Bereshit Rabba et sources classiques

רַ֞ק עֵ֣ץ אֲשֶׁר־תֵּדַ֗ע כִּֽי־לֹא־עֵ֤ץ מַאֲכָל֙ ה֔וּא אֹת֥וֹ תַשְׁחִ֖ית וְכָרָ֑תָּ וּבָנִ֣יתָ מָצ֗וֹר עַל־הָעִיר֙ אֲשֶׁר־הִ֨וא עֹשָׂ֧ה עִמְּךָ֛ מִלְחָמָ֖ה עַ֥ד רִדְתָּֽהּ׃ (פ)

Seulement, l’arbre que tu sauras n’être pas un arbre fruitier, celui-là tu peux le sacrifier et l’abattre, pour l’employer à des travaux de siège contre la ville qui est en guerre avec toi, jusqu’à ce qu’elle succombe.

Sifra

7) Of the wicked: (Devarim 20:20) "Only a tree that you know that it is not a fruitful tree, it shall you destroy and cut down, etc.": Now does this not follow a fortiori: If trees, which do not see, and which do not hear, and which do not speak, because they do not grow fruits, the Holy One did not pity them against removing them from the world, then a man who does not "grow" Torah and does not do the will of his Father in heaven, how much more so will the Holy One not pity him against removing him from the world.

Sifrei Devarim

(Devarim 20:20) "Only a tree that you know": This is a fruitful tree. (Ibid. 19) "to come before you into the siege": Cut it down.