Refers to the taste that remains in the mouth after eating or drinking. Also used figuratively for the lingering feeling or impression after an experience.
このコーヒーは後味がすっきりしている。
This coffee has a clean aftertaste.
The fight with him left a bad aftertaste.
彼の言葉には苦い後味が残った。
His words left a bitter aftertaste.
このドラマは後味がいい終わり方だった。
This drama had an ending that left a good aftertaste.
That ramen leaves an aftertaste in your mouth.
後味 is the specific lingering impression right after an event, while 名残 is a broader trace or vestige that can persist for a long time, such as remnants of a season or era.
Compound of 後 (あと, 'after') and 味 (あじ, 'taste').