The command to kill dogs, and its abrogation. The prohibition of keeping dogs, except for hunting, farming, (herding) livestock and the like Sahih Muslim 1575 c
Arabic hadith text
حَدَّثَنِي زُهَيْرُ بْنُ حَرْبٍ، حَدَّثَنَا إِسْمَاعِيلُ بْنُ إِبْرَاهِيمَ، حَدَّثَنَا هِشَامٌ الدَّسْتَوَائِيُّ، حَدَّثَنَا يَحْيَى بْنُ أَبِي كَثِيرٍ، عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم "مَنْ أَمْسَكَ كَلْبًا فَإِنَّهُ يَنْقُصُ مِنْ عَمَلِهِ كُلَّ يَوْمٍ قِيرَاطٌ إِلاَّ كَلْبَ حَرْثٍ أَوْ مَاشِيَةٍ" .
Translation
Abu Huraira (Allah be pleased with him) reported Allah's Messenger (ﷺ) as saying
He who kept a dog would lose out of his deeds equal to one qirat every day. except (one kept) for watching the field or herd.