كتاب المساقاة
22  
The Book of Musaqah
(10)
Chapter: The command to kill dogs, and its abrogation. The prohibition of keeping dogs, except for hunting, farming, (herding) livestock and the like
(10)
بَاب الْأَمْرِ بِقَتْلِ الْكِلَابِ وَبَيَانِ نَسْخِهِ وَبَيَانِ تَحْرِيمِ اقْتِنَائِهَا إِلَّا لِصَيْدٍ أَوْ زَرْعٍ أَوْ مَاشِيَةٍ وَنَحْوِ ذَلِكَ
Sahih Muslim 1574 f

Salim b. Abdullah reported on the authority of his father that Allah's Messenger (ﷺ) said:

Whosover amongst the owners of the house keeps a dog other than one meant for watching the herd or for hunting loses two qirat of his deeds every day.
حَدَّثَنَا دَاوُدُ بْنُ رُشَيْدٍ، حَدَّثَنَا مَرْوَانُ بْنُ مُعَاوِيَةَ، أَخْبَرَنَا عُمَرُ بْنُ حَمْزَةَ بْنِ عَبْدِ، اللَّهِ بْنِ عُمَرَ حَدَّثَنَا سَالِمُ بْنُ عَبْدِ اللَّهِ، عَنْ أَبِيهِ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ أَيُّمَا أَهْلِ دَارٍ اتَّخَذُوا كَلْبًا إِلاَّ كَلْبَ مَاشِيَةٍ أَوْ كَلْبَ صَائِدٍ نَقَصَ مِنْ عَمَلِهِمْ كُلَّ يَوْمٍ قِيرَاطَانِ‏"‏ ‏.‏
Reference : Sahih Muslim 1574f
In-book reference : Book 22, Hadith 67
USC-MSA web (English) reference : Book 10, Hadith 3820
  (deprecated numbering scheme)