Sahih al-Bukhari 4016, 4017
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
حَدَّثَنَا أَبُو النُّعْمَانِ، حَدَّثَنَا جَرِيرُ بْنُ حَازِمٍ، عَنْ نَافِعٍ، أَنَّ ابْنَ عُمَرَ ـ رضى الله عنهما ـ كَانَ يَقْتُلُ الْحَيَّاتِ كُلَّهَا. حَتَّى حَدَّثَهُ أَبُو لُبَابَةَ الْبَدْرِيُّ، أَنَّ النَّبِيَّ صلى الله عليه وسلم نَهَى عَنْ قَتْلِ جِنَّانِ الْبُيُوتِ، فَأَمْسَكَ عَنْهَا.
Narrated Nafi`:
Ibn `Umar used to kill all kinds of snakes until Abu Lubaba Al-Badri told him that the Prophet (ﷺ) had forbidden the killing of harmless snakes living in houses and called Jinan. So Ibn `Umar gave up killing them.
Full reference and source
Sahih al-Bukhari 4016, 4017 In-book : Book 64, Hadith 66 USC-MSA web (English) : Vol. 5, Book 59, Hadith 352 (deprecated)
View source on Sunnah.com (opens in a new tab)