IMO this is a part of hadith sciences which clearly shows a kind of scientific method and needs ijtihad. And here many "sciences" need to cooperate, one must have knowledge of narrators ('ilm ar-Rijal) especially sahaba:
When sahabi x converted to Islam?
Was sahabi x present on at this occasion?
Also knowledge of the biography of the prophet (historical knowledge) and his sahaba is necessary.
And one could imagine that knowledge of Qur'an and occasions of revelation is also necessary, beside the chronology of the revelation.
And ijma', of course one must have big knowledge of hadith sources and ahadith to be able to compare!
...
Examples of abrogated ahadith
- I prohibited you from visiting the graves, but (now) you may visit them, and I prohibited you (from eating) the flesh of sacrific- ed animals beyond three days, but now keep it as long as you like. I prohibited you from the use of Nabidh except (that preoared) in dry waterskins. Now drink (Nabidh prepared in any utensil), but do not drink when it becomes intoxicant.
(sahih Muslim and in other hadith compilations mentioned in my answer on Is it permissible for women to visit the graves of their loved ones?)
In this hadith we learn that the Prophet() has prohibited visiting graves before for some reasons... the same applies for sacrificed animals and nabidh (with a clear condition as we see), so basically this hadith has changed 3 rulings at once!
- O people, I had permitted you to contract temporary marriage with women, but Allah has forbidden it (now) until the Day of Resurrection. So he who has any (woman with this type of marriage contract) he should let her off, and do not take back anything you have given to them (as dower).
(sahih Muslim, sunan ibn Majah with some "historical" details and additions)
This hadith shows the sunni view that mut'ah marriage has been abrogated (with no chance of revision, as the hadith states "until the Day of resurrection") and this terminal abrogation happend after hajjat al-Wada' if we trust the hadith of ibn Majah (which means in the last few months of the Prophets lifetime).
- ...'We never ate the meat of the Budn for more than three days of Mina. Later, the Prophet (ﷺ) gave us permission by saying: 'Eat and take (meat) with you. So we ate (some) and took (some) with us.' ...
(Sahih al-Bukhari, shaih Muslim and other narrations in sahih al-Bukhari and sunan an-Nasa-i)
These ahadith are again showing the abrogation of the prohibition to eat sacrificed animals after three days.
- The last practice of the Messenger of Allah (ﷺ) was that he did not perform ablution after taking anything that was cooked with the help of fire. (Sunan abi Dawod and sunan an-Nasa'i -English translation is missing on sunnah.com- beside this different hadith in Jami' at-Tirmdihi)
These ahadith are abrogating ahadith such as this one in Jami' at-Tirmidhi. Note that this is a discussed hadith (there different opinions) and the last narration used as an evidence for abrogation is according to most scholars the one explaining the issue. Some scholars say that "The last practice" refers to what the Prophet () has done (or -better- in this case left out) before praying 'Asr and Jabir was not saying that the ruling has been abrogated -among them abu Dawod himself!
- "The Prophet (ﷺ) was cupped while he was in the state of lhram, and also while he was observing a fast."
(Sahih al-Bukhari and also in sunan abi Dawod, sunan ibn Majah and Jami' at-Tirmidhi)
This hadith is considered as the abrogation of an other hadith mentioned in sunan abi Dawod and on which ibn Hajar commented in his bulugh al-Maram:
"This hadith is related by the five Imams except for At-Tirmidhi. Ahmad, Ibn Khuzaimah and Ibn Hibban regarded it as authentic"
However he also says that this didn't happen in Medina, so this might be a clear mistake by a narrator, but if by "al-Baq'i" the narrator meant or was reffering to the suq in Mecca it would be correct, a shorter version is available here for example in sunan ibn Majah and other compilations.
- " 'O Messenger of Allah, what do you think about a man who touched his penis during the Salah?' He said: 'It is just a part of you,' or 'a piece of you.'" (Sunan an-Nasa-i, sunan abi Dawod)
This hadith is considered as abrogated by scholars like ibn Hebban with ahadith such as:
the Prophet said: "Whoever touches his penis, then he is not to pray until he performs Wudu"
(Jami' at-Trimdhi, sunan an-Nasa'i)
There's a similar narration on the authority of abu Hurairah in sahih ibn Hebban.
Conditions to call a hadith abrogated
- There must be a clear contradiction between two narrations (ahadith), which can't be cleared off by finding a midway or a constructive solution to explain the existing differences, for example combining them (for example there are ahadith saying the sunnah after jumu'ah is two raka'at and others saying four raka'at some scholars combined them to say the best is to pray six!). So if a combination between both is possible we can't pretend that one of the evidences is obsolete or abrogated, as this would mean excluding one evidence, while it is still valid!
Having knowledge about the nasikh and mansoukh and this needs knowledge about a few things such as:
- That the Prophet() himself has said so like in the examples 1-3 from above.
- That a sahabi () made this claim, like in the examples 4 from above.
- By knowledge of the occasion and/or date of a hadith, like in the examples 5 and 6. For example the "abrogated hadith" in example five is dated to year 8aH. while the hadith allowing cupping is dated to year 10aH. by imam a-Shafi'i,
- By consensus an example which is often cited is the hadith of killing a person who has been punished for drinking alcohol 3 times before and was caught doing this again the hadith appears in some of the sunan such as sunan abi Dawod, sunan an-Nasa-i, imam Ahmad as quoted in bulugh al-Maram and Jami' at-Tirmidhi, whom commented that he doesn't know of any opposite scholarly opinion that this was abrogated, imam A-Shafi'i said the same before, but some scholars like ibn Hazm (but ibn Hazm here was basing his view on more doubtful narrations of verdicts of 'Amr ibn al-'Aas, so the opinion that there's a consensus is much stronger) doubted this ijma', but later scholars such as a-Suytuti and al-'Iraqi even did extensive research and wrote papers confirming the opinion of at-Tirmidhi and rejecting ibn Hazm's pretended different opinion or verdict. {Abu Dawod]24 also explained the story of this abrogation.
- That the first hadith is permitting something (includes a rukhsa =permission, opportunity رخصة) and the second is a order it ('azeema/'azima عزيمة) and the first is abrogating the second.
Note that from this perspective we may exclude the ahadith of example 5 as an example of naskh as it is apparently possible to find a midway if we consider:
A man from the Companions of the Prophet (ﷺ) told me that the Messenger of Allah (ﷺ) prohibited cupping and perpetual fasting, but he had not made them unlawful showing mercy on his Companions. ... (sunan abi Dawod)
or
Anas bin Malik was asked whether they disliked the cupping for a fasting person. He replied in the negative and said, "Only if it causes weakness." (Sahih al-Bukhari)
as the midway explanation between prohibiting and allowing cupping for a fasting person.
Major source the Article (Arabic) of the scholar ibn Amin on this purpose.
See also islamqa #240706.
And an Article from majallat al-bohot al-'ilmiyah (Arabic).