So as not to obscure the problem with output,

I was trying prompted to run autoremove I ran it. It segfaulted. After which, nothing shows to be autoremove -able. Things are still present which were on the autoremove list?

I'd like to retry autoremove again.

# sudo apt-get autoremove Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: amd64-microcode aspnetcore-store-2.0.0 dotnet-host dotnet-hostfxr-2.0.0 dotnet-runtime-deps-2.1.0-preview2-26406-04 gcc-7-base:i386 gfortran-mingw-w64 gfortran-mingw-w64-i686 gfortran-mingw-w64-x86-64 gnat-mingw-w64 gnat-mingw-w64-base gnat-mingw-w64-i686 gnat-mingw-w64-x86-64 gnome-icon-theme-symbolic gnome-orca gnupg-agent gsettings-ubuntu-schemas gvfs-bin indicator-sound intel-microcode iucode-tool libapparmor-perl libarmadillo7 libbabeltrace-ctf1 libbind9-140 libboost-date-time1.62.0 libboost-filesystem1.62.0 libboost-filesystem1.62.0:i386 libboost-filesystem1.65.1:i386 libboost-iostreams1.62.0 libboost-system1.62.0 libboost-system1.62.0:i386 libboost-system1.65.1:i386 libboost-thread1.62.0 libc++1 libc++abi1 libcapnp-0.5.3 libcapnp-0.5.3:i386 libcapnp-0.6.1 libcapnp-0.6.1:i386 libcdio-cdda1 libcdio-paranoia1 libcdio13 libcommons-codec-java libcryptsetup4 libdfu1 libdns-export162 libdns162 libegl1-mesa:i386 libfreerdp-cache1.1 libfreerdp-client1.1 libfreerdp-codec1.1 libfreerdp-common1.1.0 libfreerdp-core1.1 libfreerdp-crypto1.1 libfreerdp-gdi1.1 libfreerdp-locale1.1 libfreerdp-plugins-standard libfreerdp-primitives1.1 libfreerdp-utils1.1 libfwupd1 libgcr-3-common libgeos-3.5.1 libgnome-desktop-3-12 libgnome-games-support-1-2 libgsoap-2.8.49 libgtk2-perl libhttpclient-java libhttpcore-java libical2 libicu57:i386 libidn11:i386 libisc-export160 libisc160 libisccc140 libisccfg140 libiso9660-10 libiso9660-8 libjsoup-java libkeybinder0 liblivemedia58 libllvm5.0:i386 liblouis12 liblouisutdml7 liblttng-ust-ctl2 liblttng-ust-ctl4 liblttng-ust0 liblwgeom-2.3-0 liblwres141 libmirclient9 libmirclient9:i386 libmircommon7 libmircommon7:i386 libmircore1 libmircore1:i386 libmirprotobuf3 libmirprotobuf3:i386 libnetcdf11 libntfs-3g872 libopencv-core3.1:i386 libopencv-core3.1 libopencv-imgproc3.1:i386 libopencv-imgproc3.1 liborcus-0.12-0 libp11-kit-gnome-keyring libpango-perl libplexus-classworlds2-java libplexus-utils-java libpoppler68 libprotobuf-lite10:i386 libqca2-plugin-ossl libqgis-core2.14.18 libqgis-networkanalysis2.14.18 libqgispython2.14.18 libqpdf18 libqtwebkit4 libreoffice-gtk libreoffice-gtk2 libruby2.3 libsbsms10 libsodium18 libsodium18:i386 libsss-nss-idmap0 libsuitesparseconfig4 libtbb2 libtbb2:i386 libtinyxml2-5 libtxc-dxtn-s2tc0 libtxc-dxtn-s2tc0:i386 libunistring0 liburcu6 libva-wayland1 libvcdinfo0 libvpx4 libvpx4:i386 libwagon2-java libwinpr-crt0.1 libwinpr-dsparse0.1 libwinpr-environment0.1 libwinpr-file0.1 libwinpr-handle0.1 libwinpr-heap0.1 libwinpr-input0.1 libwinpr-interlocked0.1 libwinpr-library0.1 libwinpr-path0.1 libwinpr-pool0.1 libwinpr-registry0.1 libwinpr-rpc0.1 libwinpr-sspi0.1 libwinpr-synch0.1 libwinpr-sysinfo0.1 libwinpr-thread0.1 libwinpr-utils0.1 libx264-148 libx264-148:i386 libx265-130:i386 libx265-130 libxerces-c3.1 libxfont1 linux-headers-4.13.0-40 linux-headers-4.13.0-40-generic linux-image-4.13.0-40-generic linux-image-extra-4.13.0-40-generic python-beautifulsoup python-functools32 python-imaging ruby2.3 snapd-login-service tcpd xfce4-volumed 0 upgraded, 0 newly installed, 171 to remove and 0 not upgraded. After this operation, 1,177 MB disk space will be freed. Do you want to continue? [Y/n] y E: Sub-process /usr/bin/dpkg received a segmentation fault.

Nothing left to autoremove,

# sudo apt-get autoremove Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Things are still installed (note linux-image-4.13.0-40-generic is in the list above and ii means installed)

$ dpkg -l linux-image-extra-4.13.0-40-generic Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture +++-====================================-=======================-======================= ii linux-image-extra-4.13.0-40-generic 4.13.0-40.45 amd64

They can still be manually, but I'd like to have dpkg to the same autoremove reoutine again.

# sudo apt-get --purge remove linux-image-4.13.0-40-generic Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: linux-image-4.13.0-40-generic* linux-image-extra-4.13.0-40-generic* 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. After this operation, 238 MB disk space will be freed. Do you want to continue? [Y/n] n Abort.

Can I tell Debian to recalculate the autoremove list?

This is on a dist-upgrade from Ubuntu 17.10 to Ubuntu 18.04