The Messenger of Allah ﷺ said, "Whoever leaves snakes alone out of fear of pursuing them is not one of us. We have not made peace with them since we declared war on them."
قال رسول الله ﷺ: من ترك الحيات مخافة طلبهن فليس منا ما سالمناهن منذ حاربناهن.
Abu Dawud (5250) and Ahmad (2037) both narrated it from the hadith of Abdullah bin Numayr, [who said], Musa bin Muslim narrated to us, and said, I heard Ikrima raise the hadith, as I see it, to Ibn Abbas, who said, and he related it. Its isnad is sahih.On this topic there is also a narration from Abbas bin Abdul-Muttalib, that he said to the Messenger of Allah ﷺ, "We want to clean out Zamzam, and there are some of these jinan in it" meaning the small snakes, so the Prophet ﷺ ordered that they be killed. Abu Dawud (5251) and Diya in Mukhtara (8/372-373) both narrated it from the hadith of Ahmad bin Mani, Marwan bin Muawiya narrated to us, from Musa Tahhan, who said, Abdul-Rahman bin Sabit narrated to us, from Abbas bin Abdul-Muttalib, and he related it.Munziri said in Mukhtasar Sunan (8/105), "There is some question regarding Abdul-Rahman bin Sabit's hearing from Abbas bin Abdul-Muttalib, and it appears more likely that it is mursal."I say, this is supported by the fact that between the death of Abbas bin Abdul-Muttalib (32 AH or 34 AH) and the death of Abdul-Rahman bin Sabit (118 AH) there are about eighty-five years. It is also supported by the narration of Fakihi, who narrated it in Akhbar Makkah (1162), from Muhammad bin Yahya Dhuhli, from Muhammad bin Ubayd Tanafisi, from Musa Tahhan, from Abdul-Rahman bin Sabit, who said, "The sons of Abbas wanted to clean out Zamzam, so they said, 'O Messenger of Allah...'" and the hadith continues.As for what is narrated from Abdul-Rahman bin Abu Layla, from his father, that the Messenger of Allah ﷺ was asked about the snakes of houses, and he said, "If you see any of them in your dwellings, say, 'I invoke against you the covenant that Nuh took upon you, I invoke against you the covenant that Sulayman took upon you, not to harm us.' If they return after that, then kill them."Its isnad is daif. Abu Dawud (5260), Tirmidhi (1485), and Nasai in Kubra (10738) all narrated it through the route of Ibn Abu Layla, from Thabit Bunani, from Abdul-Rahman bin Abu Layla, from his father, and he related it. The wording given is Nasai's.Tirmidhi said, "This is a hasan gharib hadith, we do not know it from the hadith of Thabit Bunani except through this route, from the hadith of Ibn Abu Layla."I say, Ibn Abu Layla, the narrator from Thabit, is Muhammad bin Abdul-Rahman bin Abu Layla, who is daif.