Package Upgrade Issue – Ubuntu Shows Packages to Upgrade When There Are None

10.04aptitudeupgrade

I have a server machine that I never log into the X display on, only via ssh. Recently I logged in and it told me I had

12 packages can be updated.
6 updates are security updates.

I actually already knew that because I run munin on it and all my other servers. So anyway, I did "sudo aptitude" and installed all the updates, then rebooted. A few days later, munin told me I needed to upgrade another package, so I logged on, but the login message said:

12 packages can be updated.
6 updates are security updates.

I went into aptitude and installed the one update. Ubuntu is still telling me I have 12 packages to update. Munin tells I don't have any. I tried aptitude -d -y dist-upgrade and apt-get -d -y dist-upgrade and both of them tell me there is nothing to install. So why is the login information still telling me I have 12 packages to update?

Best Answer

It's a bug in initscripts, fixed in Natty, which copies the current state of motd to /etc/motd.tail. motd is dynamically generated whenever you boot but motd.tail is static (allowing a sysadmin to place some fixed information there for all users).

Deleting motd.tail will fix the issue temporarily but a better solution is to create an empty motd.tail. If the file doesn't exist then it may be created again (incorrectly) when initscripts is upgraded.

Create an empty motd.tail with

sudo touch /etc/motd.tail
Related Question