Positive commandment · Mitzvat Aseh #187 of 613
To destroy the seven nations [that dwelled in] Eretz Yisrael
לאבד שבעה עממים מארץ ישראל
The verse · Devarim 20:17
כִּי־הַחֲרֵם תַּחֲרִימֵם הַחִתִּי וְהָאֱמֹרִי הַכְּנַעֲנִי וְהַפְּרִזִּי הַחִוִּי וְהַיְבוּסִי כַּאֲשֶׁר צִוְּךָ ה׳ אֱלֹהֶיךָ
“but thou shalt utterly destroy them; the Ḥitti, and the Emori, the Kena῾ani, and the Perizzi, the Ḥivvi, and the Yevusi; as the Lord thy God has commanded thee:”
The Rambam’s words
To destroy the seven nations [that dwelled in] Eretz Yisrael, as [Deuteronomy 20:17] states: "You shall utterly destroy them."
לאבד שבעה עממים מארץ ישראל, שנאמר: "החרם תחרימם" (דברים כ,יז).
Why · Sefer HaChinuch #425
Killing the seven nations
“It is from the roots of the commandment [that it is] since these seven nations are the ones that began to do all types of idolatry and every abomination of G-d that He hated.”
Who & when
“And this commandment is practiced by males and females in every place, and at all times that we have the power to kill them.”
Where in the Mishneh Torah
Hilchot Kings and Wars הלכות מלכים ומלחמות