Abu Mu’ayyid Khawaarizmi (rahimahullah) narrates that Hazrat ‘Abdullah bin Mubaarak (rahimahullah) said, “On one occasion, a few goats were stolen in Kufah. On hearing of this, Imaam Abu Hanifah (rahimahullah) enquired about the average age of a goat. When he was informed that goats normally live for up to seven years, he abstained from eating goat meat for seven years.”
Note: According to the Hanafi Mazhab, it is permissible for one to purchase a goat from the market in which a few goats were stolen when the majority of the goats in the market is of halaal sources and one does not have proof that the goat which he is purchasing is from the stolen goats. However, Imaam Abu Hanifah (rahimahullah), in his individual capacity, exercised extra caution and refrained from purchasing goats for seven years.
(‘Uqood-ul-Jummaan pg. 240)