יַ֣ד הָעֵדִ֞ים תִּֽהְיֶה־בּ֤וֹ בָרִאשֹׁנָה֙ לַהֲמִית֔וֹ וְיַ֥ד כׇּל־הָעָ֖ם בָּאַחֲרֹנָ֑ה וּבִֽעַרְתָּ֥ הָרָ֖ע מִקִּרְבֶּֽךָ׃
Let the hands of the witnesses be the first to put the condemned to death, followed by the hands of the rest of the people. Thus you will sweep out evil from your midst.
Torah Temimah points to the earlier treatments in Parashas Re’eh (13:6) and later in 19:19.
ובערת הרע מקרבך. בלשון זה – עיין לפנינו לעיל בפ׳ ראה י״ג ו׳ ולקמן פרשה י״ט.
English: “And you shall sweep out the evil from your midst.” On this language — see earlier in Parashas Re’eh 13:6 and later in chapter 19.
The closing formula of the verse is a standard refrain that appears at several points in Deuteronomy; Torah Temimah simply cross-references the earlier and later occurrences.
Derash on the verse (cross-reference) — not a formal named middah of the 13. The phrase is treated as a recurring legal-moral formula.
The execution of the idolater is the practical means by which the community removes the evil from its midst, exactly as the same formula requires in the parallel cases of the meisit and the false witnesses.