It wasnarrated from 'Abdullah bin Mughaffal that the Messenger ofAllah(ﷺ) said:
"Were it not that dogs form one of the communities(ornations – of creatures), I would have commanded that they bekilled. But kill those that are all black. There are no people whokeep a dog, except for dogs used for herding livestock, hunting orfarming, but two Qirat will be deducted from their reward each day."
English reference: Vol. 4, Book 28, Hadith 3205
Arabic reference: Book 28, Hadith 3326