Kernel packages are not completely removed during automatic cleanup

Bug #1789538 reported by Andrei Borzenkov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
New
Undecided
Unassigned

Bug Description

Some packages are left in "residual-config" state. This is confusing.

Linux bor-Latitude-E5450 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

bor@bor-Latitude-E5450:~$ dpkg-query -W linux\*
linux-base 4.5ubuntu1
linux-doc-4.15.0
linux-firmware 1.173.1
linux-firmware-snapdragon
linux-generic 4.15.0.33.35
linux-generic-hwe-16.04 4.15.0.33.35
linux-headers
linux-headers-3.0
linux-headers-4.15.0-30-generic
linux-headers-4.15.0-32 4.15.0-32.35
linux-headers-4.15.0-32-generic 4.15.0-32.35
linux-headers-4.15.0-33 4.15.0-33.36
linux-headers-4.15.0-33-generic 4.15.0-33.36
linux-headers-686-pae
linux-headers-amd64
linux-headers-generic 4.15.0.33.35
linux-headers-generic-hwe-16.04 4.15.0.33.35
linux-hwe-tools-4.15.0-29 4.15.0-29.31~16.04.1
linux-image
linux-image-4.15.0-30-generic 4.15.0-30.32
linux-image-4.15.0-32-generic 4.15.0-32.35
linux-image-4.15.0-33-generic 4.15.0-33.36
linux-image-generic 4.15.0.33.35
linux-image-generic-hwe-16.04 4.15.0.33.35
linux-image-unsigned-4.15.0-30-generic
linux-image-unsigned-4.15.0-32-generic
linux-image-unsigned-4.15.0-33-generic
linux-initramfs-tool
linux-kernel-headers
linux-kernel-headers-arm64-cross
linux-kernel-headers-mips-cross
linux-kernel-headers-mips64-cross
linux-kernel-log-daemon
linux-libc-dev:amd64 4.15.0-33.36
linux-libc-dev:i386 4.15.0-33.36
linux-libc-dev-arm64-cross 4.15.0-18.19cross1
linux-libc-dev-arm64-dcv1
linux-libc-dev-mips-cross 4.15.0-18.19cross1
linux-libc-dev-mips-dcv1
linux-libc-dev-mips64-cross 4.15.0-18.19cross1
linux-libc-dev-mips64-dcv1
linux-modules-4.15.0-30-generic 4.15.0-30.32
linux-modules-4.15.0-32-generic 4.15.0-32.35
linux-modules-4.15.0-33-generic 4.15.0-33.36
linux-modules-extra-4.15.0-30-generic 4.15.0-30.32
linux-modules-extra-4.15.0-32-generic 4.15.0-32.35
linux-modules-extra-4.15.0-33-generic 4.15.0-33.36
linux-restricted-common
linux-signed-generic 4.15.0.33.35
linux-signed-generic-hwe-16.04 4.15.0.33.35
linux-signed-image-generic 4.15.0.33.35
linux-signed-image-generic-hwe-16.04 4.15.0.33.35
linux-sound-base 1.0.25+dfsg-0ubuntu5
linux-source-4.15.0
linux-tools
linux-tools-4.15.0-32 4.15.0-32.35
linux-tools-4.15.0-32-generic 4.15.0-32.35
linux-tools-4.15.0-33 4.15.0-33.36
linux-tools-4.15.0-33-generic 4.15.0-33.36
linux-tools-common 4.15.0-33.36
linux-tools-generic 4.15.0.33.35
linux-tools-generic-hwe-16.04 4.15.0.33.35
bor@bor-Latitude-E5450:~$

or@bor-Latitude-E5450:~$ LC_ALL=C apt list linux-headers-4.15.0-30-generic linux-image-unsigned-4.15.0-30-generic linux-modules-4.15.0-30-generic linux-modules-extra-4.15.0-30-generic
Listing... Done
linux-headers-4.15.0-30-generic/bionic-updates,bionic-security 4.15.0-30.32 amd64
linux-image-unsigned-4.15.0-30-generic/bionic-updates,bionic-security 4.15.0-30.32 amd64
linux-modules-4.15.0-30-generic/bionic-updates,bionic-security,now 4.15.0-30.32 amd64 [residual-config]
linux-modules-extra-4.15.0-30-generic/bionic-updates,bionic-security,now 4.15.0-30.32 amd64 [residual-config]
bor@bor-Latitude-E5450:~$

bor@bor-Latitude-E5450:~$ LC_ALL=C sudo apt purge linux-image-4.15.0-30-generic linux-modules-4.15.0-30-generic linux-modules-extra-4.15.0-30-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  extlinux g++-4.8 gcc-5-cross-base giblib1 libaec0 libatomic1-arm64-cross libbabeltrace-ctf1
  libbonobo2-common libboost-chrono1.58.0 libboost-system1.58.0 libc6-dev-arm64-cross
  libebml4v5 libffi-dev libgcc1-arm64-cross libgomp1-arm64-cross libisc-export160
  libjasper1:i386 libjson-c2:i386 libllvm5.0:i386 libmysofa libobjc-5-dev libobjc4
  liborbit-2-0 libpango-perl libtorrent-rasterbar8 libva-drm1 libva-wayland1 libx264-148
  linux-generic-hwe-16.04 linux-hwe-tools-4.15.0-29 linux-libc-dev-arm64-cross
  linux-libc-dev-mips64-cross python-ndg-httpsclient qml-module-qtgraphicaleffects
  qml-module-qtquick-dialogs qml-module-qtquick-privatewidgets qml-module-qtwebkit
  qml-module-ubuntu-performancemetrics
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  linux-image-4.15.0-30-generic* linux-modules-4.15.0-30-generic*
  linux-modules-extra-4.15.0-30-generic*
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 301437 files and directories currently installed.)
Purging configuration files for linux-modules-extra-4.15.0-30-generic (4.15.0-30.32) ...
Purging configuration files for linux-modules-4.15.0-30-generic (4.15.0-30.32) ...
dpkg: warning: while removing linux-modules-4.15.0-30-generic, directory '/lib/modules/4.15.0-30-generic' not empty so not removed
Purging configuration files for linux-image-4.15.0-30-generic (4.15.0-30.32) ...
bor@bor-Latitude-E5450:~$
bor@bor-Latitude-E5450:~$ LC_ALL=C apt list linux-headers-4.15.0-30-generic linux-image-unsigned-4.15.0-30-generic linux-modules-4.15.0-30-generic linux-modules-extra-4.15.0-30-generic
Listing... Done
linux-headers-4.15.0-30-generic/bionic-updates,bionic-security 4.15.0-30.32 amd64
linux-image-unsigned-4.15.0-30-generic/bionic-updates,bionic-security 4.15.0-30.32 amd64
linux-modules-4.15.0-30-generic/bionic-updates,bionic-security 4.15.0-30.32 amd64
linux-modules-extra-4.15.0-30-generic/bionic-updates,bionic-security 4.15.0-30.32 amd64
bor@bor-Latitude-E5450:~$

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: apt 1.6.3ubuntu0.1
ProcVersionSignature: Ubuntu 4.15.0-33.36-generic 4.15.18
Uname: Linux 4.15.0-33-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
CurrentDesktop: Unity:Unity7:ubuntu
Date: Wed Aug 29 07:13:23 2018
DistributionChannelDescriptor:
 # This is a distribution channel descriptor
 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
 canonical-oem-somerville-trusty-amd64-20140620-0
InstallationDate: Installed on 2015-07-02 (1153 days ago)
InstallationMedia: Ubuntu 14.04 "Trusty" - Build amd64 LIVE Binary 20140620-04:25
SourcePackage: apt
UpgradeStatus: Upgraded to bionic on 2018-08-22 (6 days ago)

Revision history for this message
Andrei Borzenkov (arvidjaar-s) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.