[solved - user error] Apt update under ubuntu 22 deleted my xwiki 16.10.2 installation (jan 28, 2025)

So I just noticed my xwiki 16.10.2 installation was missing completely. As in completely uninstalled. And Tomcat9 was gone as well.

During the last apt update, I wasn’t paying attention and the packages were removed. Since I wasn’t paying attention I didn’t notice because apt update has always worked for me, right?

I don’t know why it was removed, but it might have something to do with the recent v17 release?

My fix was to try and reinstall xwiki, but I got the following error:

# apt install xwiki-tomcat9-mysql 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 xwiki-tomcat9-mysql : Depends: xwiki-common (= 16.10.3) but 17.0.0 is to be installed
E: Unable to correct problems, you have held broken packages.

doing an apt-cache show xwiki-tomcat9-mysql on my machine shows no v17 packages avilable. Only xwiki-common had a v17 package.

Instead, I reinstalled (and updated) it with this command
apt install xwiki-common=16.10.3 xwiki-tomcat9-mysql=16.10.3 xwiki-mysql-common=16.10.3

Everything is fine, but this might bite someone else in the posterior if they are not paying attention.

I just tried it, and I get very different results depending on if I use apt upgrade or apt dist-upgrade:

  • dist-upgrade indicates that to upgrade xwiki-common and xwiki-mariadb-common, it needs to remove xwiki-tomcat9-common and xwiki-tomcat9-mariadb (since they are not compatible with the 17.0.0 versions of the upgraded packages)
  • upgrade indicates that it won’t upgrade xwiki-common and xwiki-mariadb-common (because of the package removes, which upgrade refuse to do by default)

That one I don’t understand, there is no reason for it to be uninstalled, and I don’t reproduce it even with dist-upgrade. Unless you also did an apt autoremove ?

You might want to move to the lts debian repository until you are ready to move to a Debian distribution which propose the tomcat10 package.

I’m busted.

I did an
apt update && apt dist-upgrade && apt autoremove

I shall avoid that in the future, unless I am paying more attention. Thanks for the explanation.