From Sahih Bukhari (Hadith 3312): Narrated Nafi`:Ibn `Umar used to kill snakes but when Abu Lubaba informed him that the Prophet (ﷺ) had forbidden the killing of snakes living in houses, he gave up killing them