Sahih al-Bukhari · Hadith 4016

Military Expeditions led by the Prophet (pbuh) (Al-Maghaazi)

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 Jinnan. So Ibn `Umar gave up killing them