אַבֵּ֣ד תְּ֠אַבְּדוּן אֶֽת־כָּל־הַמְּקֹמ֞וֹת אֲשֶׁ֧ר עָֽבְדוּ־שָׁ֣ם הַגּוֹיִ֗ם אֲשֶׁ֥ר אַתֶּ֛ם יֹרְשִׁ֥ים אֹתָ֖ם אֶת־אֱלֹהֵיהֶ֑ם עַל־הֶהָרִ֤ים הָֽרָמִים֙ וְעַל־הַגְּבָע֔וֹת וְתַ֖חַת כָּל־עֵ֥ץ רַעֲנָן׃
אונטערברענגען זאָלט איר אונטערברענגען אַלע ערטער װאָס די פֿעלקער װאָס איר ירשעט זײ האָבן דאָרטן געדינט זײערע געטער, אױף די הױכע בערג, און אױף די בערגלעך, און אונטער יעטװעדער צװײַגהאַפֿטיקן בױם.
Rashi
Those idolators who worship the mountains - it is taught in a baraita in Tractate Avodah Zarah [Avodah Zarah 45a:1] that deriving benefit from the mountains is permitted, as it is written: "their gods, upon the [high] mountains" [Deuteronomy 12:2] -- but [you are] not [obligated to destroy] the hills [themselves that are] their gods.
Rashi
And he appointed judges When the seer told him, “good things were found in you, for you abolished the asheroth,” he approached the Sepher Torah [to see] whether he had abolished them properly. He first saw that it was written (Deut. 12:2f.): “You shall utterly destroy...and you shall burn their asherim with fire and cut down the images of their gods,” and he remembered that it is written in כִּי תִשָׂא (Exod. 34:13): “And you shall break down their monuments, etc.” He wondered why he had pleased the Lord by abolishing the asherim, the Jewish asherim, for [the Torah] only warned about their asherim. He went back to [the Torah portion] (Deut. 16:18): “Judges and law enforcing agents,” and found written (verse 21): “You shall not plant an asherah.” Then he rejoiced that he had abolished them. He also saw written there: “Judges and law enforcing agents you shall appoint for yourself,” and immediately “he appointed judges,” strong ones.
Bartenura
ומפני מה אשרה אסורה – meaning to say just as we expound (Deuteronomy 12:2): “[You must destroy all the sites at which the nations you are to dispossess worshipped] their gods, whether on lofty mountains [and on hills or under any luxuriant tree],” and not ‘on their lofty mountains, their gods’, so also “under any luxuriant tree” (ibid.,) their gods, and not ‘the luxuriant trees of their gods.’ And why did the Torah prohibit this? As it is written (Deuteronomy 7:5): “cut down their sacred posts.”