Sahih al Bukhari 5481
Hunting, Slaughtering
حَدَّثَنَا الْمَكِّيُّ بْنُ إِبْرَاهِيمَ، أَخْبَرَنَا حَنْظَلَةُ بْنُ أَبِي سُفْيَانَ، قَالَ سَمِعْتُ سَالِمًا، يَقُولُ سَمِعْتُ عَبْدَ اللَّهِ بْنَ عُمَرَ، يَقُولُ سَمِعْتُ النَّبِيَّ صلى الله عليه وسلم يَقُولُ " مَنِ اقْتَنَى كَلْبًا إِلاَّ كَلْبٌ ضَارٍ لِصَيْدٍ أَوْ كَلْبَ مَاشِيَةٍ، فَإِنَّهُ يَنْقُصُ مِنْ أَجْرِهِ كُلَّ يَوْمٍ قِيرَاطَانِ ".
Narrated `Abdullah bin `Umar:I heard the Prophet (ﷺ) saying, "If someone keeps a dog neither for hunting, nor for guarding livestock, the reward (for his good deeds) will be reduced by two Qirats per day
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.