Wondered what the heck ESM was, after years of seeing references to it whenever logging in to an Ubuntu session. Turns out it's part of the Pro edition for Ubuntu, so this is an advertisement. ESM is a security improvement if you need it and pay for it, but it's an annoying nag screen if you don't.
Finding out how to eliminate the nag screen was surprisingly difficult, multiple sites giving bad or outdated or complicated information.
Knowing this had to have a simple fix somewhere, I kept looking. Here's what I finally found, from Canonical's own info at readthedocs-hosted.com:
sudo touch /var/lib/update-notifier/hide-esm-in-motd sudo /usr/lib/update-notifier/update-motd-updates-available --force
That's it. On one of my servers, running the second command generated a minor error, but it still worked. Elsewhere, it just silently worked.
The next time you login, the ESM messages are gone, but regular security update messages are still there.
Enjoy.