Comment 13 for bug 1766217

Revision history for this message
Tommy Trussell (tommy-trussell) wrote :

TL;DR -- today using apt-get autoremove deleted the offensive lines in /var/lib/apt/extended_states and restored the list in software-updater -- though I doubt that will work every time.

Today I saw the blank software-updater list again on this Xenial (Ubuntu 16.04) system.

@eric97's comment caused me to try something OTHER than blow away the file -- I have already installed the latest kernel updates, but apparently didn't get around to removing the outdated ones.

Running apt autoremove worked to restore my updates list. I am not sure whether I had lots of old kernels last time, though I doubt it. I no longer use a separate /boot partition on this machine but back when I USED to I got into the habit of running apt autoremove after kernel updates. (Because it a real PITA when your /boot partition fills up.)

Session transcript (edited lightly):

twt@hostname:~$ sudo apt update
[sudo] password for twt:
Hit:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:2 http://archive.canonical.com/ubuntu xenial InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Hit:4 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:5 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:6 http://us.archive.ubuntu.com/ubuntu xenial-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
16 packages can be upgraded. Run 'apt list --upgradable' to see them.

twt@hostname:~$ apt list --upgradeable
Listing... Done
chromium-browser/xenial-updates,xenial-security,xenial-security 69.0.3497.81-0ubuntu0.16.04.1 amd64 [upgradable from: 68.0.3440.106-0ubuntu0.16.04.1]
chromium-browser-l10n/xenial-updates,xenial-updates,xenial-security,xenial-security,xenial-security,xenial-security 69.0.3497.81-0ubuntu0.16.04.1 all [upgradable from: 68.0.3440.106-0ubuntu0.16.04.1]
chromium-codecs-ffmpeg-extra/xenial-updates,xenial-security,xenial-security 69.0.3497.81-0ubuntu0.16.04.1 amd64 [upgradable from: 68.0.3440.106-0ubuntu0.16.04.1]
firefox/xenial-updates,xenial-security,xenial-security 62.0+build2-0ubuntu0.16.04.4 amd64 [upgradable from: 62.0+build2-0ubuntu0.16.04.3]
firefox-locale-en/xenial-updates,xenial-security,xenial-security 62.0+build2-0ubuntu0.16.04.4 amd64 [upgradable from: 62.0+build2-0ubuntu0.16.04.3]
initramfs-tools/xenial-updates,xenial-updates 0.122ubuntu8.12 all [upgradable from: 0.122ubuntu8.11]
initramfs-tools-bin/xenial-updates 0.122ubuntu8.12 amd64 [upgradable from: 0.122ubuntu8.11]
initramfs-tools-core/xenial-updates,xenial-updates 0.122ubuntu8.12 all [upgradable from: 0.122ubuntu8.11]
libgit2-24/xenial-updates,xenial-security,xenial-security 0.24.1-2ubuntu0.2 amd64 [upgradable from: 0.24.1-2]
libpam-systemd/xenial-updates 229-4ubuntu21.4 amd64 [upgradable from: 229-4ubuntu21.2]
libsystemd0/xenial-updates 229-4ubuntu21.4 amd64 [upgradable from: 229-4ubuntu21.2]
libudev1/xenial-updates 229-4ubuntu21.4 amd64 [upgradable from: 229-4ubuntu21.2]
systemd/xenial-updates 229-4ubuntu21.4 amd64 [upgradable from: 229-4ubuntu21.2]
systemd-sysv/xenial-updates 229-4ubuntu21.4 amd64 [upgradable from: 229-4ubuntu21.2]
udev/xenial-updates 229-4ubuntu21.4 amd64 [upgradable from: 229-4ubuntu21.2]

twt@hostname:~$ uname -a
Linux hostname 4.4.0-135-generic #161-Ubuntu SMP Mon Aug 27 10:45:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

twt@hostname:~$ cat /var/lib/apt/extended_states
Package: linux-headers-4.4.0-133
Architecture: amd64
Auto-Installed: 1

Package: linux-image-extra-4.4.0-133-generic
Architecture: amd64
Auto-Installed: 1

Package: linux-headers-4.4.0-133-generic
Architecture: amd64
Auto-Installed: 1

Package: linux-image-4.4.0-133-generic
Architecture: amd64
Auto-Installed: 1

Package: linux-headers-4.4.0-134
Architecture: amd64
Auto-Installed: 1

Package: linux-image-extra-4.4.0-134-generic
Architecture: amd64
Auto-Installed: 1

Package: linux-headers-4.4.0-134-generic
Architecture: amd64
Auto-Installed: 1

Package: linux-image-4.4.0-134-generic
Architecture: amd64
Auto-Installed: 1

Package: linux-image-extra-4.4.0-135-generic
Architecture: amd64
Auto-Installed: 1

twt@hostname:~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  linux-headers-4.4.0-133 linux-headers-4.4.0-133-generic linux-image-4.4.0-133-generic linux-image-extra-4.4.0-133-generic
0 upgraded, 0 newly installed, 4 to remove and 16 not upgraded.
After this operation, 303 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 384921 files and directories currently installed.)
Removing linux-headers-4.4.0-133-generic (4.4.0-133.159) ...
Removing linux-headers-4.4.0-133 (4.4.0-133.159) ...
Removing linux-image-extra-4.4.0-133-generic (4.4.0-133.159) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-133-generic /boot/vmlinuz-4.4.0-133-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-133-generic /boot/vmlinuz-4.4.0-133-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-133-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-133-generic /boot/vmlinuz-4.4.0-133-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-133-generic /boot/vmlinuz-4.4.0-133-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-133-generic /boot/vmlinuz-4.4.0-133-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-133-generic /boot/vmlinuz-4.4.0-133-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-135-generic
Found initrd image: /boot/initrd.img-4.4.0-135-generic
Found linux image: /boot/vmlinuz-4.4.0-134-generic
Found initrd image: /boot/initrd.img-4.4.0-134-generic
Found linux image: /boot/vmlinuz-4.4.0-133-generic
Found initrd image: /boot/initrd.img-4.4.0-133-generic
Found linux image: /boot/vmlinuz-4.4.0-131-generic
Found initrd image: /boot/initrd.img-4.4.0-131-generic
Found linux image: /boot/vmlinuz-4.4.0-130-generic
Found initrd image: /boot/initrd.img-4.4.0-130-generic
Found linux image: /boot/vmlinuz-4.4.0-128-generic
Found initrd image: /boot/initrd.img-4.4.0-128-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
Removing linux-image-4.4.0-133-generic (4.4.0-133.159) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-133-generic /boot/vmlinuz-4.4.0-133-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-133-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-133-generic /boot/vmlinuz-4.4.0-133-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-135-generic
Found initrd image: /boot/initrd.img-4.4.0-135-generic
Found linux image: /boot/vmlinuz-4.4.0-134-generic
Found initrd image: /boot/initrd.img-4.4.0-134-generic
Found linux image: /boot/vmlinuz-4.4.0-131-generic
Found initrd image: /boot/initrd.img-4.4.0-131-generic
Found linux image: /boot/vmlinuz-4.4.0-130-generic
Found initrd image: /boot/initrd.img-4.4.0-130-generic
Found linux image: /boot/vmlinuz-4.4.0-128-generic
Found initrd image: /boot/initrd.img-4.4.0-128-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done

twt@hostname:~$ cat /var/lib/apt/extended_states
Package: linux-headers-4.4.0-134
Architecture: amd64
Auto-Installed: 1

Package: linux-image-extra-4.4.0-134-generic
Architecture: amd64
Auto-Installed: 1

Package: linux-headers-4.4.0-134-generic
Architecture: amd64
Auto-Installed: 1

Package: linux-image-4.4.0-134-generic
Architecture: amd64
Auto-Installed: 1

Package: linux-image-extra-4.4.0-135-generic
Architecture: amd64
Auto-Installed: 1

twt@hostname:~$

[I restarted software-updater and its window shows the updates now.]