Language:
كتاب بدء الخلق
59  
Beginning of Creation
(14)
Chapter: The Statement of Allah Taa'la: "... And the moving creatures of all kinds that He has scattered therein..."
(14)
بَابُ قَوْلِ اللَّهِ تَعَالَى: {وَبَثَّ فِيهَا مِنْ كُلِّ دَابَّةٍ}
Sahih al-Bukhari 3297, 3298

Narrated Ibn `Umar:

That he heard the Prophet (ﷺ) delivering a sermon on the pulpit saying, "Kill snakes and kill Dhu-at- Tufyatain (i.e. a snake with two white lines on its back) and Al-Abtar (i.e. a snake with short or mutilated tail) for they destroy the sight of one's eyes and bring about abortion." (`Abdullah bin `Umar further added): Once while I was chasing a snake in order, to kill it, Abu Lubaba called me saying: "Don't kill it," I said. "Allah's Messenger (ﷺ) ordered us to kill snakes." He said, "But later on he prohibited the killing of snakes living in the houses." (Az-Zuhri said. "Such snakes are called Al-Awamir.")

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ مُحَمَّدٍ، حَدَّثَنَا هِشَامُ بْنُ يُوسُفَ، حَدَّثَنَا مَعْمَرٌ، عَنِ الزُّهْرِيِّ، عَنْ سَالِمٍ، عَنِ ابْنِ عُمَرَ ـ رضى الله عنهما ـ أَنَّهُ سَمِعَ النَّبِيَّ صلى الله عليه وسلم يَخْطُبُ عَلَى الْمِنْبَرِ يَقُولُ ‏ "‏ اقْتُلُوا الْحَيَّاتِ، وَاقْتُلُوا ذَا الطُّفْيَتَيْنِ وَالأَبْتَرَ، فَإِنَّهُمَا يَطْمِسَانِ الْبَصَرَ، وَيَسْتَسْقِطَانِ الْحَبَلَ ‏"‏‏.‏ قَالَ عَبْدُ اللَّهِ فَبَيْنَا أَنَا أُطَارِدُ، حَيَّةً لأَقْتُلَهَا فَنَادَانِي أَبُو لُبَابَةَ لاَ تَقْتُلْهَا‏.‏ فَقُلْتُ إِنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَدْ أَمَرَ بِقَتْلِ الْحَيَّاتِ‏.‏ قَالَ إِنَّهُ نَهَى بَعْدَ ذَلِكَ عَنْ ذَوَاتِ الْبُيُوتِ، وَهْىَ الْعَوَامِرُ‏.‏
Reference : Sahih al-Bukhari 3297, 3298
In-book reference : Book 59, Hadith 106
USC-MSA web (English) reference : Vol. 4, Book 54, Hadith 518
  (deprecated numbering scheme)