In chapter 24 of Joshua it can be found saying in verse 14 "Therefore fear Jehovah and serve him with integrity and faithfulness and remove the gods that your forefathers served on the other side of the rive and in in Egypt., and serve Jehovah"
Hope this helps!