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 just updated my HTPC to 13.04 (using do-release-upgrade) and when logging in I get the "new release available" message, while there isn't as I've just upgraded and running that version.

me@mybox: ~$ssh htpc
me@htpc's password: 
Welcome to Ubuntu 13.04 (GNU/Linux 3.8.0-19-generic i686)

 * Documentation:  https://help.ubuntu.com/

New release '13.04' available.
Run 'do-release-upgrade' to upgrade to it.

So I am at 13.04, but I can upgrade to 13.04. Sounds like a plan. Or not.

I have done an apt-get update and upgrade (was nothing new) and rebooted the machine. Why is this message still here, and what needs fixing so it goes away?

For more info maybe:

htpc:~$ uname -a
Linux HTPC 3.8.0-19-generic #29-Ubuntu SMP Wed Apr 17 18:19:42 UTC 2013 i686 athlon i686 GNU/Linux
share|improve this question
add comment

5 Answers

up vote 33 down vote accepted

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
share|improve this answer
    
Used this method and it worked. Cannot accept until 2 days are over :) –  Nanne Apr 29 '13 at 15:32
    
Thanks for this thorough investigation. To clarify: doing sudo rm /var/lib/ubuntu-release-upgrader/release-upgrade-available followed by sudo /usr/lib/ubuntu-release-upgrader/release-upgrade-motd fixes the stale message. –  natevw Apr 30 '13 at 19:29
2  
You shouldn't need (or even want to) remove that second one! It's a script that checks for new upgrades available (but only if it hasn't found one before and saved it). So only the one in /var/lib/ should be removed I think. –  Nanne Apr 30 '13 at 19:37
    
Right, remove the release-upgrade-available "flag" and then re-run the release-upgrade-motd script. –  natevw Apr 30 '13 at 20:05
1  
Just FYI, there do appear to be bug reports in for it - here's one. Looks like there's a fix in for 13.10. –  thegrinner May 16 '13 at 12:11
show 1 more comment

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.

share|improve this answer
add comment

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

share|improve this answer
    
Well, it is in the motd in fact (as it is the motd), but wouldn't that be cheating? the system believes it has an update for some reason, I'd like to find out why –  Nanne Apr 29 '13 at 15:21
    
if the 1st command does not find updates even after running sudo apt-get update and lsb_release -sc gives you raring you are update and the message is incorrect therefore should be removed –  GM-Script-Writer-62850 Apr 29 '13 at 15:23
    
I agree. I just do not agree with your method of removing the motd ;) –  Nanne Apr 29 '13 at 15:27
    
+1 for pointing me to motd, not complete answer though, because it would have come back if I just removed that. –  Nanne Apr 29 '13 at 15:31
add comment

I did the following:

  1. cd /var/lib/ubuntu-release-upgrader/
  2. mv release-upgrade-available release-upgrade-available.old
  3. cd /usr/lib/ubuntu-release-upgrader/
  4. ./check-new-release
  5. Log Out/In

MOTD was back to normal.

Probably the same as above, but I don't like deleting things without fully knowing the consequences. I'll just leave that file there, and wait for the 13.10 to prompt for upgrade in October. Once I know that's working, I'll delete the .old file (or not, it's really not hurting anything).

share|improve this answer
    
the file is a flag, there's no need to do this at all. –  Nanne May 21 '13 at 20:30
add comment

There is now a fix released, just run sudo aptitude update && sudo aptitude full-upgrade and the message will be removed.

share|improve this answer
    
Doesn't this update your whole system? That's sounds a bit silly :) Anyway, this question was about what to do if the message doesn't go away. Good to know it probably won't be sticky again tough, but this might be better as a comment? –  Nanne Jun 13 '13 at 19:05
add comment

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.