The command to kill dogs, and its abrogation. The prohibition of keeping dogs, except for hunting, farming, (herding) livestock and the like Sahih Muslim 1576 b

Arabic hadith text
حَدَّثَنَا يَحْيَى بْنُ أَيُّوبَ، وَقُتَيْبَةُ، وَابْنُ، حُجْرٍ قَالُوا حَدَّثَنَا إِسْمَاعِيلُ، عَنْ يَزِيدَ بْنِ، خُصَيْفَةَ أَخْبَرَنِي السَّائِبُ بْنُ يَزِيدَ، أَنَّهُ وَفَدَ عَلَيْهِمْ سُفْيَانُ بْنُ أَبِي زُهَيْرٍ الشَّنَئِيُّ فَقَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم بِمِثْلِهِ
Translation

This hadith has been narrated on the authority of Sufyan b. Abu Zuhair al-Shana'i.