Ubuntu server: The list of available updates is more than a week old

Solution 1:

I filed this bug report: https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1943638

I have also described a workaround there.

[Edit] Description of the workaround:

In my case, an uncaught exception in line 150 of the file /usr/lib/update-notifier/apt_check.py was the cause.

I fixed this by adding a try...except block around it.

Original code:

    is_esm_supported = bool(
                DISTRO in ubuntu_distro.supported_esm()

Modified code:

    try:
        is_esm_supported = bool(
                DISTRO in ubuntu_distro.supported_esm()
    )
    except AttributeError:
        is_esm_supported = False

Solution 2:

The script source of the message (Ubuntu 20.04?) seems to be from

/etc/update-motd.d/90-updates-available

The actual problem (for me) is that

/var/lib/update-notifier/updates-available

is older than 7-days and should be pretty much empty. I achieved that by

echo | sudo tee /var/lib/update-notifier/updates-available