It was narrated that Abu Hurairah said: “The Messenger of Allah (ﷺ) said: ‘Whoever keeps a dog, one Qirat will be deducted from him (good) deeds every day, except a dog for farming or herding livestock.”
It was narrated from ‘Abdullah bin Mughaffal that the Messenger of Allah (ﷺ) said: “Were it not that dogs form one of the communities (or nations – of creatures), I would have commanded that they be killed. But kill those that are all black. There are no people who keep a dog, except for dogs used for herding livestock, hunting or farming, but two Qirat will be deducted from their reward each day.”
It was narrated that Sufyan bin Abu Zuhair said: “I heard the Prophet (ﷺ) say: ‘Whoever keeps a dog that he does not need for farming or herding, one Qirat will be deducted from his (good) deeds each day.’”