וַיֹּ֤אמֶר יַעֲקֹב֙ אֶל־בֵּית֔וֹ וְאֶ֖ל כָּל־אֲשֶׁ֣ר עִמּ֑וֹ הָסִ֜רוּ אֶת־אֱלֹהֵ֤י הַנֵּכָר֙ אֲשֶׁ֣ר בְּתֹכְכֶ֔ם וְהִֽטַּהֲר֔וּ וְהַחֲלִ֖יפוּ שִׂמְלֹתֵיכֶֽם׃
And Yaakov said to his household and to all who were with him: Put away the foreign gods that are in your midst, and purify yourselves, and change your garments.
Torah Temimah points to Bereshit Rabbah 81:2.
Sefaria · Bereshit Rabbah 81:2
הסירו את אלהי הנכר — אלו עבודה זרה.
“Put away the foreign gods” — these are idols.
The Midrash identifies the foreign gods as objects of idolatry that had entered the household.
Derash on the removal of idols (Bereshit Rabbah).
Yaakov required the removal of foreign gods from his household before ascending to Beit-El.