My problem is caused by a registered bug in the Nvidia 340 drivers which installs clashing libraries, that's all known but the result is as below. Sadly, the root cause is now lost in the noise as I failed to notice the problem developing and tried to fix it!
Any attempt at update or fixing brings up something like below:
(Reading database ... 295094 files and directories currently installed.)
Preparing to unpack .../libgles1_1.0.0-2ubuntu2.2_i386.deb ...
Unpacking libgles1:i386 (1.0.0-2ubuntu2.2) ...
dpkg: error processing archive /var/cache/apt/archives/libgles1_1.0.0-2ubuntu2.2_i386.deb (--unpack):
trying to overwrite '/usr/lib/i386-linux-gnu/libGLESv1_CM.so.1', which is also in package nvidia-340 340.106-0ubuntu3
Preparing to unpack .../libglvnd-dev_1.0.0-2ubuntu2.2_i386.deb ...
Unpacking libglvnd-dev:i386 (1.0.0-2ubuntu2.2) ...
dpkg: error processing archive /var/cache/apt/archives/libglvnd-dev_1.0.0-2ubuntu2.2_i386.deb (--unpack):
trying to overwrite '/usr/lib/i386-linux-gnu/libGLESv1_CM.so', which is also in package nvidia-340 340.106-0ubuntu3
Errors were encountered while processing:
/var/cache/apt/archives/libgles1_1.0.0-2ubuntu2.2_i386.deb
/var/cache/apt/archives/libglvnd-dev_1.0.0-2ubuntu2.2_i386.deb
How do I break this bottleneck and get my system updating again?
I have tried:
sudo apt --fix-broken install
sudo apt-get purge nvidia*
Can I safely remove the something to free up the process? The packages below or the archives above, for instance, which seem to be causing the immediate problem. If I can remove them how do I do it?
The following packages have unmet dependencies.
libegl1-mesa-dev : Depends: libglvnd-dev but it is not going to be installed
libgl1-mesa-dev : Depends: libglvnd-dev but it is not going to be installed
libgles2-mesa-dev : Depends: libglvnd-dev but it is not going to be installed
I have found other answers that force the overwriting of the troublesome libraries but they are fraught with potential troubles and do not directly address the root of the problem, the released update fixes the problem not the symptoms and the answer below fulfils that update.