First I do sudo apt-get update.

Now, when I get the MOTD (Message of the Day) by doing /usr/lib/update-notifier/apt-check --human-readable, the output I get is:

18 updates can be applied immediately.
9 of these updates are standard security updates.
To see these additional updates run: apt list --upgradable

However, when I do sudo apt list --upgradable, the output is a list of 21 packages, not the expected 18.

I have two questions:

  1. Can someone explain this discrepancy?
  2. How do I get the names of the 18 packages referenced by the MOTD?

The discrepancy occurs because MOTD does not update at each login, so the MOTD count may be stale. Use apt for current information.

The number of packages can vary during each day as apt updates are run (there's a daily timer job for that), as unattended-upgrades installs security upgrades (there's another daily timer for that), as new updates appear in the repositories, and as you manually run apt tools.

You cannot get the names of the 18 packages - they are not retained when apt generates the number for MOTD. However, there is nothing special about them -- they were simply the 18 at the time that MOTD message was generated, which may have been hours ago. Run a normal apt update/upgrade, then logout, then login again to see how the MOTD has changed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.