וְעַתָּ֕ה הָסִ֛ירוּ אֶת־אֱלֹהֵ֥י הַנֵּכָ֖ר אֲשֶׁ֣ר בְּקִרְבְּכֶ֑ם וְהַטּוּ֙ אֶת־לְבַבְכֶ֔ם אֶל־יְהוָ֖ה אֱלֹהֵ֥י יִשְׂרָאֵֽל׃
Now therefore put away the strange gods which are among you, and incline your heart unto the LORD, the God of Israel.’
Read midrashic interpretation of Joshua 24:23: and classical rabbinic exegesis.