The command to kill dogs, and its abrogation. The prohibition of keeping dogs, except for hunting, farming, (herding) livestock and the like Sahih Muslim 1570 c
Arabic hadith text
وَحَدَّثَنِي حُمَيْدُ بْنُ مَسْعَدَةَ، حَدَّثَنَا بِشْرٌ، - يَعْنِي ابْنَ الْمُفَضَّلِ - حَدَّثَنَا إِسْمَاعِيلُ، - وَهُوَ ابْنُ أُمَيَّةَ - عَنْ نَافِعٍ، عَنْ عَبْدِ اللَّهِ، قَالَ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلميَأْمُرُ بِقَتْلِ الْكِلاَبِفَنَنْبَعِثُ فِي الْمَدِينَةِ وَأَطْرَافِهَا فَلاَ نَدَعُ كَلْبًا إِلاَّ قَتَلْنَاهُ حَتَّى إِنَّا لَنَقْتُلُ كَلْبَ الْمُرَيَّةِ مِنْ أَهْلِ الْبَادِيَةِ يَتْبَعُهَا
Translation
Abdullah (b. Umar) (Allah be pleased with them) reported
Allah's Messenger (ﷺ) ordered the killing of dogs and we would send (men) in Medina and its corners and we did not spare any dog that we did not kill, so much so that we killed the dog that accompanied the wet she-camel belonging to the people of the desert.