Ruling on raising animals and chickens at home when the neighbours are annoyed by their smell
Question

We raise domesticated animals such as sheep and chickens, and we made a shelter for them at the side of the house. We clean the shelter every week, and sometimes every other week, to remove the odour of their dung and urine. But even if we clean the shelter every week, or every other week, some of the unpleasant odour remains. The neighbours hate it, and they forced us to slaughter the chickens, but not the sheep, because we only put the sheep in the shelter at night, to protect them from being stolen. My question is: it is regarded as causing annoyance to our neighbours, because we put the sheep in only at night, to protect them from being stolen, and we clean the shelter every week or every other week?
Praise be to Allah.If the neighbours are annoyed by the odour of the sheep or chickens, or other animals, then you must stop annoying them, and get rid of these animals or keep them far away from the houses, because of the evidence which indicates that it is haram to cause annoyance to neighbours.
Al-Bukhari (6016) narrated from Abu Shurayh that the Prophet (blessings and peace of Allah be upon him) said: “By Allah he does not believe, by Allah he does not believe, by Allah he does not believe.” It was said: Who, O Messenger of Allah? He said: “The one from whose evil conduct his neighbour is not safe.”
Muslim (46) narrated from Abu Hurayrah that the Messenger of Allah (blessings and peace of Allah be upon him) said: “He will not enter Paradise, whose neighbour is not safe from his evil conduct.”
This indicates that causing annoyance to one’s neighbour is a major sin.
Ibn Hajar al-Haytami said in az-Zawajir ‘an Iqtiraf al-Kaba’ir (1/422): Major sin no. 210: causing annoyance to one’s neighbour even if he is a non-Muslim living under Muslim rule. End quote.
Al-Bukhari (6105) and Muslim (2624) narrated that Ibn ‘Umar (may Allah be pleased with him) said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “Jibreel kept urging me that neighbours should be treated well until I thought he would make them heirs.”
The jurists have stated that such things are not allowed.
It says in Durar al-Hukkam Sharh Majallat al-Ahkam (3/216), under the heading Warding off extreme harm by whatever means:
5.. If someone builds a slaughterhouse  near a mosque and bothers the worshippers with the smell of the slaughtered animals and their foul-smelling dung, if the qadi (judge) is informed of that, he should stop him from doing that (‘Ali Afandi).
6.. If someone persists in tanning hides in his house and bothers his neighbours, he should be stopped. But if he does that only rarely, he should not be stopped (ad-Durr al-Manthur). End quote.
In al-Mi‘yaar by al-Wanshirisi (8/412) it says: Abu Hafs al-‘Ata’ was asked about someone who made vinegar in his house, and his neighbours told him: Its smell harms us and it damages the walls.
He replied: If the physicians say that the smell is harmful, and builders say that it damages the walls, then he should be stopped from doing that, unless he builds a wall in front of their wall which will prevent it from reaching their wall and harming them, in which case he should not be stopped. And he mentioned that Shaykh Abu Bakr ibn ‘Abd ar-Rahman also issued a fatwa disallowing it for their sake and for the sake of the wall. End quote.
Based on that, you did well by getting rid of the chickens.
As for the sheep, if keeping them in this shelter overnight will lead to the production of an odour that will annoy the neighbours, then you also have to get rid of them, or move them to a place far away from the house.
As for the domestic animals which live inside the house, and people in your country usually keep them as pets in their houses, the matter is more lenient than in the case of those which are not usually kept in houses.
And Allah knows best.