"And God remembered Noah" (Genesis 8:1). This is what Scripture says: "The remembrance of a righteous one is for a blessing" (Proverbs 10:7) — this is Noah, concerning whom it is written, "a righteous man" (Genesis 6:9). "But the name of the wicked shall rot" (Proverbs 10:7) — this is the generation of the flood, who rotted away from the world, as it is said, "And He blotted out" (Genesis 7:23). What is the meaning of "And He blotted out"? It is like the matter of which it is said, "For I will utterly blot out" (Exodus 17:14). Therefore, "but the name of the wicked shall rot" (Proverbs 10:7).
Why the Flood Generation Rotted While Noah Was Remembered
Midrash Tanchuma Buber, Noach 9:1
ויזכור אלהים את נח. זש"ה זכר צדיק לברכה (משלי י ז), זה נח שכתיב בו איש צדיק, ושם רשעים ירקב (שם), זה דור המבול שנרקבו מן העולם, שנאמר וימח (בראשית ז כג), מהו וימח, כענין שנאמר כי מחה אמחה (שמות יז יד), לפיכך ושם רשעים ירקב.