Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    
Did you do sudo aptitude update again? Just to make sure it updated ;) Also, running sudo aptitude safe-upgrade might help, you can use aptitude just like apt-get, with the command-line arguments... aptitude alone starts the interactive interface, which I personally know a good group of users dont use. –  Thomas W. Apr 22 '11 at 22:03
    
@Evil, it's not aptitude that's having the problem, it's whatever Ubuntu uses to report how many packages need to be upgraded. aptitude installed the 12 package updates a few days ago. –  Paul Tomblin Apr 22 '11 at 22:15
1  
FWIW, I'm seeing the same issue on Ubuntu 10.10 now. Maybe a bug? –  grm Apr 23 '11 at 14:48
    
Yes, could you submit a bug on this? and link to this question. –  Jeremy Bicha Apr 27 '11 at 22:12

7 Answers 7

up vote 6 down vote accepted

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
share|improve this answer
1  
I'm seeing this same problem in 12.04.2 LTS, and there is no /etc/motd.tail file; just /etc/motd, which contains the offending text. The timestamp ("System information as of...") is accurate, but the updateable package count is not. –  Eric Lambart May 16 '13 at 0:43

The problem appears to be the logic in /usr/lib/update-notifier/update-motd-updates-available which is deciding that there are is no reason to run /usr/lib/update-notifier/apt-check --human-readable based on timestamps on /var/lib/update-notifier/updates-available and sources.list and a few other files.

I'm not sure what the actual bug is, but removing the cached file has at least reset it to 0 updates, although God only knows if it will show the correct number when there are updates available.

share|improve this answer

I've recently answered a similar question on Serverfault:

ubuntu server: SSH banner telling to update packages but nothing to update

That banner you're talking about is called MOTD (Message Of The Day). It appears to be a bug which can be work-arounded by deleting the /etc/motd.tail file.

share|improve this answer

If it's just the login message (motd) that is telling you the packages need updating, then it may just be that update-motd hasn't run in a while. Try running update-motd and then logging in again to see if that fixes it. It should regenerate the /etc/motd file.

share|improve this answer
    
Package info for update-motd says "The functionality formerly provided by this package is now integrated into pam_motd, in libpam-modules." –  Paul Tomblin Apr 23 '11 at 11:49

On several systems I had seen incorrect reports of packages to be updated, but also 2 lines 'Ubuntu 10.04.2 LTS' and 'Ubuntu 10.04.1 LTS' even though I was on 10.04.2.

As Karl said, /etc/motd.tail contained the old text, and deleting it solved the problem for me perfectly

share|improve this answer

I am having the same issue on 10.04.2.

# aptitude install update-motd

Selecting previously deselected package update-motd.
(Reading database ... 36453 files and directories currently installed.)
Unpacking update-motd (from .../update-motd_3.5-0ubuntu1_all.deb) ...
 Removing any system startup links for /etc/init.d/update-motd ...
Setting up update-motd (3.5-0ubuntu1) ...

But there's no update-motd command line tool afterwords and I can't find anything about pam_motd.

Removing the /etc/motd made the message go away, but obviously the safe-upgrade should have already done that.

share|improve this answer

Check if /etc/motd.tail contains the update messages. If yes, remove them.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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