Abdullah bin Abbas reported,

When the Messenger of Allah ﷺ arrived, he refused to enter the House while the idols were inside, so he ordered that they be removed. They brought out an image of Ibrahim and Ismail with divining arrows in their hands.The Messenger of Allah ﷺ said, "May Allah destroy them. By Allah, they knew well that these two never sought omens through divining arrows."Then he entered the House and proclaimed Allah's greatness in its corners, but he did not pray inside it.

Bukhari 1601

Sahih

حدثنا أبو معمر حدثنا عبد الوارث حدثنا أيوب حدثنا عكرمة

عن ابن عباس رضي الله عنهما قال

إن رسول الله ﷺ لما قدم أبى أن يدخل البيت وفيه الآلهة فأمر بها فأخرجت فأخرجوا صورة إبراهيم وإسماعيل في أيديهما الأزلام فقال رسول الله ﷺ قاتلهم الله أما والله لقد علموا أنهما لم يستقسما بها قط فدخل البيت فكبر في نواحيه ولم يصل فيه

البخاري 1601صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Hajj
Chapter
Whoever made takbir in the areas around the Kaaba
Numbering
Darussalam 1601
Bukhari 1601