Score:0

My do-release-upgrade to 23.04 (from 22.10) failed and now apt lists many packages suitable for autoremove

bw flag
nic

I recently performed a 'do-release-upgrade' from 22.10 to 23.04 on my Desktop installation. It went well until this point:

2023-04-21 08:19:23,651 ERROR got an error from dpkg for pkg: 'linux-headers-6.2.0-20-generic': 'installed linux-headers-6.2.0-20-generic package post-installation script subprocess returned error exit status 1'
2023-04-21 08:19:23,652 DEBUG running apport_pkgfailure() linux-headers-6.2.0-20-generic: installed linux-headers-6.2.0-20-generic package post-installation script subprocess returned error exit status 1
2023-04-21 08:19:29,225 ERROR got an error from dpkg for pkg: 'linux-headers-generic': 'dependency problems - leaving unconfigured'
2023-04-21 08:19:29,225 DEBUG running apport_pkgfailure() linux-headers-generic: dependency problems - leaving unconfigured
2023-04-21 08:19:29,225 DEBUG dpkg error because of dependency problems, not reporting against linux-headers-generic 
2023-04-21 08:20:05,416 ERROR got an error from dpkg for pkg: 'linux-generic': 'dependency problems - leaving unconfigured'
2023-04-21 08:20:05,417 DEBUG running apport_pkgfailure() linux-generic: dependency problems - leaving unconfigured
2023-04-21 08:20:05,417 DEBUG dpkg error because of dependency problems, not reporting against linux-generic 
2023-04-21 08:23:41,678 ERROR got an error from dpkg for pkg: 'linux-image-6.2.0-20-generic': 'installed linux-image-6.2.0-20-generic package post-installation script subprocess returned error exit status 1'
2023-04-21 08:23:41,678 DEBUG running apport_pkgfailure() linux-image-6.2.0-20-generic: installed linux-image-6.2.0-20-generic package post-installation script subprocess returned error exit status 1
2023-04-21 08:24:06,510 ERROR Exception during pm.DoInstall()
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-nbne_rgq/DistUpgrade/DistUpgradeView.py", line 220, in run
    res = pm.do_install(self.writefd)
apt_pkg.Error: E:Sub-process /usr/bin/dpkg returned an error code (1)
2023-04-21 08:24:06,539 ERROR SystemError from cache.commit(): installArchives() failed
2023-04-21 08:24:06,539 ERROR found exception: 'E:Sub-process /usr/bin/dpkg returned an error code (1)'
2023-04-21 08:24:09,768 DEBUG Running PostInstallScript: './xorg_fix_proprietary.py'
2023-04-21 08:24:09,789 DEBUG Running PostInstallScript: '/usr/lib/ubuntu-advantage/upgrade_lts_contract.py'

The problem was some stale DKMS stuff left behind by DisplayLink. I was able to get through that, and get a clean 'apt install -f' and was left with a functioning system.

However, ever since then, when I perform any 'apt' operation, I am presented with a huge list of packages to be 'autoremoved':

The following packages were automatically installed and are no longer required:
  aapt abootimg androguard android-framework-res android-libaapt android-libandroidfw android-libart
  android-libbacktrace android-libbase android-libcutils android-liblog android-libnativebridge
  android-libnativeloader android-libutils android-libziparchive apksigcopier apksigner apktool
  binutils-multiarch bruteforce-luks ca-certificates-mono caca-utils cli-common coreboot-utils
  coreboot-utils-doc cramfsswap dctrl-tools default-jdk-headless device-tree-compiler dexdump dh-dkms
  diffoscope diffoscope-minimal enjarify fatcat flashrom fontforge-common fontforge-extras fonts-cantarell
  fonts-inconsolata fonttools fp-compiler-3.2.2 fp-units-rtl-3.2.2 fp-utils fp-utils-3.2.2 fpc-source-3.2.2
  freeglut3 gcc-12-base:i386 giflib-tools gir1.2-mutter-11 gir1.2-nma-1.0 gir1.2-xmlb-2.0 gist gnumeric
  gnumeric-common gnumeric-doc hdf5-tools indicator-messages java-wrappers jsbeautifier junit ledit
  lib2geom1.1.0 libabsl20210324 libaec0 libantlr-java libantlr3-runtime-java libaopalliance-java
  libapache-pom-java libapksig-java libappimage0 libarchive-tools libatinject-jsr330-api-java libavif14
  libb2-1 libbpf0 libcdi-api-java libclang-cpp15 libcommons-cli-java libcommons-compress-java
  libcommons-io-java libcommons-lang3-java libcommons-parent-java libcommons-text-java libcupsfilters1
  libdom4j-java libegl-dev liberror-prone-java libexporter-tiny-perl libflac8 libfontembed1 libfontforge4
  libfwupdplugin7 libgeronimo-annotation-1.3-spec-java libgeronimo-interceptor-3.0-spec-java libgit2-1.3
  libgl-dev libgl1-mesa-dev libgles-dev libgles1 libglu1-mesa-dev libglut-dev libglut3.12 libglvnd-core-dev
  libglvnd-dev libglx-dev libgoffice-0.10-10 libgoffice-0.10-10-common libgs9-common libgssdp-1.2-0
  libguava-java libguice-java libgupnp-1.2-1 libhdf5-103-1 libhdf5-hl-100 libicu4j-java libicu71
  libiniparser1 libintellij-annotations-java libjansi-java libjavaparser-java libjavascriptcoregtk-5.0-0
  libjaxen-java libjcommander-java libjdom1-java libjetbrains-annotations-java libjsr305-java libldap-2.5-0
  liblerc3 liblist-moreutils-perl liblist-moreutils-xs-perl libluajit-5.1-2 libluajit-5.1-common
  libmaven-archiver-java libmaven-file-management-java libmaven-jar-plugin-java libmaven-parent-java
  libmaven-resolver-java libmaven-shared-io-java libmaven-shared-utils-java libmaven3-core-java
  libmono-btls-interface4.0-cil libmono-corlib4.5-cil libmono-corlib4.5-dll libmono-i18n-west4.0-cil
  libmono-i18n4.0-cil libmono-security4.0-cil libmono-system-configuration4.0-cil libmono-system-core4.0-cil
  libmono-system-numerics4.0-cil libmono-system-security4.0-cil libmono-system-xml4.0-cil
  libmono-system4.0-cil libmonoboehm-2.0-1 libmpdec3 libmutter-11-0 libopengl-dev libperl5.34 libpfm4
  libplacebo192 libplexus-archiver-java libplexus-cipher-java libplexus-classworlds-java
  libplexus-component-annotations-java libplexus-interpolation-java libplexus-io-java
  libplexus-sec-dispatcher-java libplexus-utils2-java libpoppler123 libprocyon-java libprotobuf-lite23
  libprotobuf23 libpython3.10 libpython3.10-dev libpython3.10-minimal libpython3.10-stdlib libqpdf28
  libqt5opengl5 libqt6core6 libqt6dbus6 libqt6gui6 libqt6network6 libqt6opengl6 libqt6openglwidgets6
  libqt6printsupport6 libqt6sql6 libqt6sql6-sqlite libqt6test6 libqt6widgets6 libqt6xml6 libre2-9
  libreoffice-ogltrans libreoffice-pdfimport librygel-core-2.6-2 librygel-db-2.6-2 librygel-renderer-2.6-2
  librygel-server-2.6-2 libsaxonhe-java libsisu-inject-java libsisu-plexus-java libslf4j-java libsmali-java
  libsnappy-java libsnappy-jni libspiro1 libstringtemplate-java libsz2 libtext-trim-perl libtiff5 libtiffxx5
  libts0 libubootenv-tool libubootenv0.1 libwagon-provider-api-java libwebkit2gtk-5.0-0 libwireshark15
  libwiretap12 libwsutil13 libwxbase3.0-0v5 libwxgtk3.0-gtk3-0v5 libxerces2-java
  libxml-commons-external-java libxml-commons-resolver1.1-java libxmlb-dev libxmlbeans-java libxmlunit-java
  libxom-java libxpp3-java libxt-dev libxz-java libyaml-snake-java libz3-4 libz3-dev llvm llvm-15
  llvm-15-dev llvm-15-linker-tools llvm-15-runtime llvm-15-tools llvm-runtime mono-4.0-gac mono-gac
  mono-runtime mono-runtime-common mono-runtime-sgen mono-utils mtd-utils netkit-telnet ocaml ocaml-base
  ocaml-compiler-libs ocaml-interp ocaml-man ocaml-nox oggvideotools openjdk-11-jdk-headless
  openjdk-17-jdk-headless perl-modules-5.34 pgpdump procyon-decompiler pxlib1 pyqt5-dev-tools
  pyqt6-dev-tools python3-asn1crypto python3-binwalk python3-botocore python3-charset-normalizer
  python3-defusedxml python3-editorconfig python3-jsbeautifier python3-jsondiff python3-libarchive-c
  python3-magic python3-networkx python3-opengl python3-oscrypto python3-pdfminer python3-progressbar
  python3-pycryptodome python3-pydot python3-pypdf python3-pypdf2 python3-pyperclip python3-pyqt5.qtopengl
  python3-pyqt6 python3-pyqt6.sip python3-pyqtgraph python3-pyxattr python3-rpm python3-rsa
  python3-s3transfer python3-tlsh python3.10 python3.10-dev python3.10-minimal qt6-base-dev-tools
  qt6-gtk-platformtheme qt6-qpa-plugins qt6-translations-l10n qtbase5-dev-tools qtchooser ruby3.0 sng
  sqlite3 toilet toilet-fonts u-boot-tools wabt xmlbeans
Use 'apt autoremove' to remove them.

Since it's been asked in comments; No, I haven't removed my -desktop package:

$ dpkg --get-selections | grep "ubuntu-desktop"
ubuntu-desktop                      install
ubuntu-desktop-minimal              install

How do I get this cleared up? I'd like to be able to actually use 'apt autoremove' without worrying that my system will be rendered useless.

Thanks in advance, -nic

guiverc avatar
cn flag
Have you explored where the package(s) come from? ie. many look 3rd party and not from Ubuntu repositories (*but I could be wrong too*), I picked one (*at random*) I felt that was is found in Ubuntu repositories and `coreboot-utils` is version `4.15~dfsg-3` but it's not an installed package on my own system.. Most issues in *release-upgrade* are due to 3rd party packages, and those aren't essential to a Ubuntu system. Also being specific as to if your installation is desktop & server is helpful...
nic avatar
bw flag
nic
My apologies; I only posted a small subset of the packages listed, due to the length. I thought it would be better not to list them all. I'll edit the question to include the full list, which is quite extensive. -nic
nic avatar
bw flag
nic
@karel, I do not believe this is due to unattended upgrades. This only just appeared as a problem immediately following the interrupted do-release-upgrade. In any event, unlike that poster, I do not have 'autoremove unused dependencies' feature active.
user535733 avatar
cn flag
Looks like you might have removed your`____-desktop` metapackage
nic avatar
bw flag
nic
@user535733 No, I haven't removed any ____-desktop packages (see edit, above).
user535733 avatar
cn flag
Then go ahead and autoremove all those webpage-development and secondary (non-default) applications and long-forgotten add-ons. If you autoremove something important, simply reinstall it. The alternative is to go through the list, item by item, and determine if you want it (were I in your shoes, that's what I would do).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.