I upgraded from 12.04 to 14.04 and ever since then, when I log in over SSH, the available updates is incorrect and out of date. This never happened with 12.04.
For example:
Log in and no updates are shown.
Exit and log in again. I now see:
25 packages can be updated.
15 updates are security updates.I do the update and log out. Then log in and it still says:
25 packages can be updated.
15 updates are security updates.Log out and log in and now see
System reboot required.
The output from today's 1st login was
0 packages can be updated.
0 updates are security updates.
So I exit and log in again and now see:
1 package can be updated.
1 update is a security update.
So I run it and the result is:
Get:1 http://security.ubuntu.com trusty-security InRelease [65.9 kB]
Get:2 http://security.ubuntu.com trusty-security/main Sources [117 kB]
Get:3 http://security.ubuntu.com trusty-security/restricted Sources [4,035 B]
Get:4 http://security.ubuntu.com trusty-security/universe Sources [37.3 kB]
Get:5 http://security.ubuntu.com trusty-security/multiverse Sources [2,760 B]
Get:6 http://security.ubuntu.com trusty-security/main amd64 Packages [485 kB]
Get:7 http://security.ubuntu.com trusty-security/restricted amd64 Packages [13.0 kB]
Get:8 http://security.ubuntu.com trusty-security/universe amd64 Packages [130 kB]
Get:9 http://security.ubuntu.com trusty-security/multiverse amd64 Packages [4,978 B]
Get:10 http://security.ubuntu.com trusty-security/main i386 Packages [458 kB]
Get:11 http://security.ubuntu.com trusty-security/restricted i386 Packages [12.7 kB]
Get:12 http://security.ubuntu.com trusty-security/universe i386 Packages [130 kB]
Get:13 http://security.ubuntu.com trusty-security/multiverse i386 Packages [5,168 B]
Hit http://security.ubuntu.com trusty-security/main Translation-en
Ign http://us.archive.ubuntu.com trusty InRelease
Hit http://security.ubuntu.com trusty-security/multiverse Translation-en
Hit http://security.ubuntu.com trusty-security/restricted Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Get:14 http://us.archive.ubuntu.com trusty-updates InRelease [65.9 kB]
Get:15 http://us.archive.ubuntu.com trusty-backports InRelease [65.9 kB]
Hit http://us.archive.ubuntu.com trusty Release.gpg
Get:16 http://us.archive.ubuntu.com trusty-updates/main Sources [277 kB]
Get:17 http://us.archive.ubuntu.com trusty-updates/restricted Sources [5,352 B]
Get:18 http://us.archive.ubuntu.com trusty-updates/universe Sources [156 kB]
Get:19 http://us.archive.ubuntu.com trusty-updates/multiverse Sources [5,939 B]
Get:20 http://us.archive.ubuntu.com trusty-updates/main amd64 Packages [773 kB]
Get:21 http://us.archive.ubuntu.com trusty-updates/restricted amd64 Packages [15.9 kB]
Get:22 http://us.archive.ubuntu.com trusty-updates/universe amd64 Packages [361 kB]
Get:23 http://us.archive.ubuntu.com trusty-updates/multiverse amd64 Packages [13.2 kB]
Get:24 http://us.archive.ubuntu.com trusty-updates/main i386 Packages [740 kB]
Get:25 http://us.archive.ubuntu.com trusty-updates/restricted i386 Packages [15.6 kB]
Get:26 http://us.archive.ubuntu.com trusty-updates/universe i386 Packages [363 kB]
Get:27 http://us.archive.ubuntu.com trusty-updates/multiverse i386 Packages [13.6 kB]
Hit http://us.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://us.archive.ubuntu.com trusty-updates/multiverse Translation-en
Hit http://us.archive.ubuntu.com trusty-updates/restricted Translation-en
Hit http://us.archive.ubuntu.com trusty-updates/universe Translation-en
Get:28 http://us.archive.ubuntu.com trusty-backports/main Sources [9,551 B]
Get:29 http://us.archive.ubuntu.com trusty-backports/restricted Sources [28 B]
Get:30 http://us.archive.ubuntu.com trusty-backports/universe Sources [35.2 kB]
Get:31 http://us.archive.ubuntu.com trusty-backports/multiverse Sources [1,898 B]
Get:32 http://us.archive.ubuntu.com trusty-backports/main amd64 Packages [13.3 kB]
Get:33 http://us.archive.ubuntu.com trusty-backports/restricted amd64 Packages [28 B]
Get:34 http://us.archive.ubuntu.com trusty-backports/universe amd64 Packages [43.2 kB]
Get:35 http://us.archive.ubuntu.com trusty-backports/multiverse amd64 Packages [1,571 B]
Get:36 http://us.archive.ubuntu.com trusty-backports/main i386 Packages [13.3 kB]
Get:37 http://us.archive.ubuntu.com trusty-backports/restricted i386 Packages [28 B]
Get:38 http://us.archive.ubuntu.com trusty-backports/universe i386 Packages [43.2 kB]
Get:39 http://us.archive.ubuntu.com trusty-backports/multiverse i386 Packages [1,552 B]
Hit http://us.archive.ubuntu.com trusty-backports/main Translation-en
Hit http://us.archive.ubuntu.com trusty-backports/multiverse Translation-en
Hit http://us.archive.ubuntu.com trusty-backports/restricted Translation-en
Hit http://us.archive.ubuntu.com trusty-backports/universe Translation-en
Hit http://us.archive.ubuntu.com trusty Release
Hit http://us.archive.ubuntu.com trusty/main Sources
Hit http://us.archive.ubuntu.com trusty/restricted Sources
Hit http://us.archive.ubuntu.com trusty/universe Sources
Hit http://us.archive.ubuntu.com trusty/multiverse Sources
Hit http://us.archive.ubuntu.com trusty/main amd64 Packages
Hit http://us.archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://us.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://us.archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com trusty/main i386 Packages
Hit http://us.archive.ubuntu.com trusty/restricted i386 Packages
Hit http://us.archive.ubuntu.com trusty/universe i386 Packages
Hit http://us.archive.ubuntu.com trusty/multiverse i386 Packages
Hit http://us.archive.ubuntu.com trusty/main Translation-en
Hit http://us.archive.ubuntu.com trusty/multiverse Translation-en
Hit http://us.archive.ubuntu.com trusty/restricted Translation-en
Hit http://us.archive.ubuntu.com trusty/universe Translation-en
Ign http://us.archive.ubuntu.com trusty/main Translation-en_US
Ign http://us.archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://us.archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://us.archive.ubuntu.com trusty/universe Translation-en_US
Fetched 4,499 kB in 5s (775 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
libxml2
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 573 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libxml2 amd64 2.9.1+dfsg1-3ubuntu4.8 [573 kB]
Fetched 573 kB in 0s (1,256 kB/s)
(Reading database ... 41499 files and directories currently installed.)
Preparing to unpack .../libxml2_2.9.1+dfsg1-3ubuntu4.8_amd64.deb ...
Unpacking libxml2:amd64 (2.9.1+dfsg1-3ubuntu4.8) over (2.9.1+dfsg1-3ubuntu4.7) ...
Setting up libxml2:amd64 (2.9.1+dfsg1-3ubuntu4.8) ...
Processing triggers for libc-bin (2.19-0ubuntu6.9) ...
and then I exit and log in again and it still says
1 package can be updated.
1 update is a security update.
and then I exit and log in again and now it is correctly not showing any updates available at all.
To reiterate - the problem is NOT with the updating, the problem is with the available updates ALWAYS being delayed by one log in/log out cycle. Makes absolutely no sense to me!
apt-get dist-upgrade --dry-run
? – David Foerster Jun 04 '16 at 16:240 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
That bug was from 2011 and I don't have a motd file. – martinjbaker Jun 06 '16 at 07:16