According to the hadiths, when Hazrat Mahdi (as) appears he will eliminate all the superstitious beliefs and practices that have entered Islam subsequently.
As revealed in the words, "... he will treat people with the Sunnah of the Prophet (saas)…,” meaning he will follow the path of our Prophet (saas) and be instrumental in people truly living by the moral values of the religion, as in his time.
He [Hazrat Mahdi (as)] will sustain Islam in the end just as our Prophet (saas) sustained Islam in the beginning… (Ibn Hajar al-Haythami, Al-Qawl al-Mukhtasar fi `Alamat al-Mahdi al-Muntadhar, p. 27)
... Hazrat Mahdi (as) will practice the religion to exactly as it was in the time of the Prophet (saas). He will remove the religious schools from the world. No school will be left apart from the true, pure religion. (Al-Barzanji, Al-Isha'ah li-ashrat al-sa'ah, 186-187)
Hazrat Mahdi (as) will leave no subsequent innovation of religion. (Ibn Hajar al-Haythami, Al-Qawl al-Mukhtasar fi `Alamat al-Mahdi al-Muntadhar, p. 43)
Hazrat Mahdi (as) will leave no subsequent innovation of religion uneradicated. He will fully discharge the obligations of the religion in the End Times, in exactly the same way as our Prophet (saas)." (Ibn Hajar al-Haythami, Al-Qawl al-Mukhtasar fi `Alamat al-Mahdi al-Muntadhar, p. 163)
Innovation of religion (Bidah): Superstituos traditions that are incorporated into the religion even though they are not in the true essence of religion.