Genesis 35:4

And they gave unto Jacob all the strange gods which were in their hand, and all their earrings which were in their ears; and Jacob hid them under the oak which was by Shechem.

The household gave up to Jacob every foreign god held in their hands. They also gave up every earring from their ears, and those earrings were bound up with their idolatrous practices and wrongdoing. Their surrender was a cleansing from idolatry, an act of humility that put away wrong from among them.

It was done to prepare them to go up to Bethel to worship God. There Jacob would build an altar to God and offer sacrifice for their sins to make atonement, while also seeking God's protection for the journey. Jacob hid those surrendered objects under the oak that stood by Shechem.

They were never found again. The oak thus marked the place where the household put away its idols. God accepted Jacob's effort to remove the wrong from his family, blessed him, and renewed His promise to him.