What happens as the good ones go
They leave in order.
يَذْهَبُ الصَّالِحُونَ الأَوَّلُ فَالأَوَّلُ، وَيَبْقَى حُفَالَةٌ كَحُفَالَةِ الشَّعِيرِ أَوِ التَّمْرِ
Yadhhabu-ṣ-ṣāliḥūna-l-awwalu fa-l-awwal, wa yabqā ḥufālatun ka-ḥufālati-sh-shaʿīri awi-t-tamr
The righteous depart, the first and then the first, and there remains a residue like the chaff of barley or of dates.
Where this comes from
Ḥufālah is what is left in the bottom of the sieve after the grain has gone through. The image is of a good thing being steadily removed rather than a bad thing arriving.
The full narration
Narrated Mirdas Al-Aslami:The Prophet (ﷺ) said, "The righteous (pious people will depart (die) in succession one after the other, and there will remain (on the earth) useless people like the useless husk of barley seeds or bad dates
Source
Ṣaḥīḥ al-Bukhārī · 6434
- Agreed upon as authentic (al-Bukhārī / Muslim)