Source: Path to Islam:
As a Muslim, you shouldn’t keep a dog in the house.
Keeping a dog is one of the reasons the angels don’t enter a house. This is due to the following hadites:
Ibn Abbas (Allah’s goodwill on both) reported: “I heard Abu Talha say that the Messenger of Allah (Allah’s Blessing and Peace on Him) said the following:
“The angels do not enter an apartment where there is a dog or dog.gives a picture and/ or a sculpture.” (Hadith sahih “autentic” at Bukhari, No. 3225)
But that would not be the only thing.Keeping a dog without any of the reasons sucks up some of your good deeds every day. That is, your rewards “Hasanat” will be every day less as long as you have a dog for no reason (not in the apartment just for keeping for no reason can also be in the shepherd or in the farm and trozdem the Hasanat go away) as the Prophet said in the Hadith.
Abu Huraira (Allah’s pleasure on him) reported that the Messenger of Allah (Allah’s Blessing and Peace on Him) said:
“Whoever keeps a dog will reduce his (good) deeds by a part every day – except for the dog, which is kept for the purpose of agriculture and sheep smelting.” …
Abu Huraira also reported that the Prophet (Allah’s Blessing and Peace on Him) said: “… the dog kept for hunting and sheep-hunting shall be exempted from this.’ (Hadith sahih at Bukhari, No. 2322)
It should be mentioned here that the scholars have different opinions on this and that one has to make a distinction between normal domestic dogs and purpose dogs.
For example, some scholars say that those dogs that are allowed to keep (such as a hunting dog, watchdog, etc.) do not prevent the angels from entering a house.
Imam an-Nawawi said in the Sharh: “The scholars had different opinions about whether the angels would not enter an apartment unless there was a dog or a picture. is a dog that is not allowed to be kept or whether it is generally the case with all dogs; also for those who may be held, for the reasons that have been mentioned.”
Ibn Hajar said: “Imam al-Khattabi and others said that the angels can enter houses where there are dogs kept for hunting, pasture and for guarding the harvest.” [Fath al-Bari
Imam an-Nafrawi al-Maliki in the Sharh to ar-Risala of Ibn Abi Zayd also mentioned that Imam al-Khattabi and al-Qa’i ‘Iya’ believed that the dogs whose possessions are allowed did not prevent the angels from entering the house.
By the way, the opinion of the Malikiyah in general is that keeping a purpose dog (guard dog, hunting dog, shepherd dog, etc.) in the apartment is perfectly permitted and that keeping a normal domestic dog is also allowed, but macr’h (i.e. not ‘aram).
Thus, in an explanation to Murshid al-Mu’in by Ibn Ashir al-Maliki, the following is said: “As far as keeping a dog in the apartment, it is muba’ (allowed) if one has a need for it (e.g. watchdog, guide dog, hunting dog, etc.) and it is spoiled if one is spoiled if one has no real need for the dog (e.g. pet dog).” [The Guiding Helper, Footnote: 2140
Equally noteworthy is the tradition of Ibn Abi Zayd al-Qayrawani, which can be found in Shar’ar-Risala of an-Nafrawi, where it is said that al-Qayrawani had a watchdog in his house and when one complained about it he said: “Would (Imam) Malik still be in our house. time, he would have a lion.”
The correct view from these hadiths is that it is not allowed to keep a domestic dog in the apartment for no specific reason and necessary purpose.