Chapter: The command to kill dogs, and its abrogation. The prohibition of keeping dogs, except for hunting, farming, (herding) livestock and the like
Abu Zubair heard Jabir b. 'Abdullah (Allah be pleased with him) saying: Allah's Messenger ( صلی اللہ علیہ وسلم ) ordered us to kill dogs, and we carried out this order so much so that we also kill the dog coming with a woman from the desert. Then Allah's Apostle ( صلی اللہ علیہ وسلم ) forbade their killing. He (the Prophet further) said: It is your duty the jet-black (dog) having two spots (on the eyes), for it is a devil.
Authentic