Ibn ʿUmar used to kill snakes, but afterwards he forbade their killing and said, "Once the Prophet ﷺ pulled down a wall and saw a cast-off skin of a snake in it. He said, 'Look for the snake. 'They found it and the Prophet ﷺ said, "Kill it." For this reason I used to kill snakes. Later on I met Abu Lubaba who told me the Prophet ﷺ said, 'Do not kill snakes except the short-tailed or mutilated-tailed snake with two white lines on its back, for it causes abortion and makes one blind. So kill it.' "
إِنَّ النَّبِيَّ ﷺ هَدَمَ حَائِطًا لَهُ فَوَجَدَ فِيهِ سِلْخَ حَيَّةٍ فَقَالَ انْظُرُوا أَيْنَ هُوَ فَنَظَرُوا فَقَالَ اقْتُلُوهُ فَكُنْتُ أَقْتُلُهَا لِذَلِكَ فَلَقِيتُ أَبَا لُبَابَةَ فَأَخْبَرَنِي أَنَّ النَّبِيَّ ﷺ قَالَ لاَ تَقْتُلُوا الْجِنَّانَ إِلاَّ كُلَّ أَبْتَرَ ذِي طُفْيَتَيْنِ فَإِنَّهُ يُسْقِطُ الْوَلَدَ وَيُذْهِبُ الْبَصَرَ فَاقْتُلُوهُ