Bereishis Rabbah 81:3.
Sefaria · Bereishis Rabbah 81:3
הסירו את אלהי הנכר — אלו הצלמים שנטלו משכם.
“Put away the foreign gods” — these are the images that they had taken from Shechem.
The idols that Yaakov ordered removed were the images captured in the sack of Shechem.
Category C — Contextual / narrative identification.
Method — Bereishis Rabbah identifies the foreign gods as the images the family took from Shechem during the events involving Dinah. The preceding narrative supplies the referent of the phrase.
Textual trigger — “Hasiru et elohei ha-nechar asher be-tochechem” in Bereishis 35:2, read with the images taken from Shechem in Bereishis 34.