The Prophet ﷺ said, "Whoever keeps a dog, except a dog used for hunting or for guarding livestock, two qirats are deducted from his reward each day."
أخبرنا عبد الجبار بن العلاء عن سفيان قال حدثنا الزهري
عن النبي ﷺ قال من اقتنى كلبا إلا كلب صيد أو ماشية نقص من أجره كل يوم قيراطان
Muslim reported it in the Book of Sharecropping, chapter on the command to kill dogs and its explanation of the abrogation of that ruling, hadith no. 1574, from the hadith of Sufyan bin Uyayna with this chain, and it is also in Al-Kubra, hadith no. 4798.