Sahih Muslim Book 22, Hadith Number 4851.

Chapter : It was not permissible to eat the flesh of sacrificial animals beyond three days at the beginning of Islam, but this prohibition was abrogated, and now it is permissible.

Abu ‘Ubaid, the freed slave of Ibn Azhar, reported that he said ‘Id (prayer) with Umar b. al-Khattab, and then said the ‘Id (prayer) with ‘Ali b. Abu Talib. He (the narrator further) reported: He led us in prayer before delivering the sermon and then addressed the people saying: Allah’s Messenger (may peace be upon him) has forbidden you to eat the flesh of your sacrificial animals beyond three nights, so do not eat that.