When the Israelites invaded Canaan under Joshua’s command, they annihilated the Canaanites – just total destruction. The herem to me, seems tantamount to genocide. From Devarim (via chabad.org)
However, of these peoples’ cities, which the Lord, your God, gives you as an inheritance, you shall not allow any soul to live.
:רַ֗ק מֵֽעָרֵ֤י הָֽעַמִּים֙ הָאֵ֔לֶּה אֲשֶׁר֙ יְהֹוָ֣ה אֱלֹהֶ֔יךָ נֹתֵ֥ן לְ֖ךָ נַֽחֲלָ֑ה לֹ֥א תְחַיֶּ֖ה כָּל־נְשָׁמָֽה
The rest of the text says it is for the purity of the land that was promised to the Israelites, but what exactly was the reason for the non-purity that called for extermination. It seems moreso that the impurity came from a lack of a covenant with God, so why extermination? Why not expulsion?