Nafi' reported that Ibn 'Urnar used to kill all types of snakes until Abu Lubaba bin 'Abdul Mundhir Badri reported that Allah's Messenger (ﷺ) had forbidden the killing of the snakes of the houses, and so he abstained from it.
Hadith ReferenceSahih Muslim / The Book of Greetings / Hadith: 2233