Update available message after installing update

It looks like the culprit is /etc/update-motd.d/91-release-upgrade

This calls /usr/lib/ubuntu-release-upgrader/release-upgrade-motd

This file checks for the file /var/lib/ubuntu-release-upgrader/release-upgrade-available

If that exists, it goes in the motd. If it doesn't, it calls /usr/lib/ubuntu-release-upgrader/check-new-release.

That last command does give the right result, but the file was not removed for some reason. I removed the file and re-ran the commands. The msg-of-the-day wasn't put back.

So the final issue was the 'cache' of 'update needed' wasn't cleared.

I removed this file and it was fixed without breaking anything :)

sudo rm /var/lib/ubuntu-release-upgrader/release-upgrade-available

This was a 12.10 -> 13.04 upgrade. On my other box (12.04 LTS, having the same issue) I had to look in another location:

sudo rm /var/lib/update-notifier/release-upgrade-available

if you open the file /etc/update-motd.d/91-release-upgrade, inside you'll see that calls the bash /usr/lib/ubuntu-release-upgrader/release-upgrade-motd. When you open this file inside we find this code:

stamp=/var/lib/ubuntu-release-upgrader/release-upgrade-available
if [ -s "$stamp" ]; then
        # Stamp exists and is populated, so display
        cat "$stamp"
        echo
elif [ -f "$stamp" ]; then
        # Stamp exists, but is empty, see if it's expired
        now=$(date +%s)
        lastrun=$(stat -c %Y "$stamp") 2>/dev/null || lastrun=0
        expiration=$(expr $lastrun + 86400)
        if [ $now -ge $expiration ]; then
                # But is older than 1 day old, so update in the background
                /usr/lib/ubuntu-release-upgrader/check-new-release -q > "$stamp$
        fi
else
        # No cache at all, so update in the background
        /usr/lib/ubuntu-release-upgrader/check-new-release -q > "$stamp" &
fi

stamp variable is populade by /var/lib/ubuntu-release-upgrader/release-upgrade-available file if exist or if it's empty else it check if exist a new release. in /var/lib/ubuntu-release-upgrader/release-upgrade-available if you open with text editor (nano, vi ...) you will find just the message that there is a new release of Ubuntu, so if you empty that or remove you force to check if there is a new release.

I hope I explained and sorry about my bad english.


try sudo apt-get dist-upgrade
you may have that message in this file /etc/motd
If you are up to date, you can run sodo rm /etc/motd <-- edit if you have custom welcome text