Installing nvidia-opencl-icd-367 breaks the package manager

O.k. to fix this (I had the same troubles this morning) you have two ways:

1. The clean way proposed to me by the launchpad team per e-mail:

To work around this issue, you may first switch to a text console by pressing Ctrl+Alt+F1, then stop your display manager using sudo systemctl stop <displaymanager>, where is lightdm, gdm, sddm, or whichever other display manager you are using.

Stopping X clears the unmount failure, allowing you to successfully upgrade to ~gpu16.04.6, which no longer contains the defective patch, using sudo apt upgrade. At this point, you can then run sudo systemctl reboot to reboot the system, which should return it to normal functionality.

If you still receive an error indicating

Unit var-lib-snapd-lib-gl.mount not loaded.

you may work around this issue by running

sudo touch /lib/systemd/system/var-lib-snapd-lib-gl.mount && sudo systemctl daemon-reload

before attempting to repeat the upgrade. After the upgrade is complete, to clean up run

sudo touch /lib/systemd/system/var-lib-snapd-lib-gl.mount

2. The way I approached it this morning by brute forcing a complete removal:

To work around this issue, you may first switch to a text console by pressing Ctrl+Alt+F1, then start again by

sudo apt-get remove --purge nvidia*

followed by

sudo dpkg --remove --force-all nvidia-opencl-icd-367`

Then sudo apt-get autoremove followed by a sudo apt-get clean, and again a sudo apt-get remove --purge nvidia.

Now it should still mention any packages you cant remove then switch to /var/lib/dpkg/info and find the files called <packagename>.prerm, <packagename>.postinst and <packagename>.postrm, for all those files do the following (beware this is not the sane way to remove something):

sudo su
> <packagename>.prerm
> <packagename>.postinst
> <packagename>.postrm
exit

When you have done this, start the removal as usual with

sudo apt-get remove <packagename>

do this until all is purged, then

sudo apt-get update && sudo apt-get dist-upgrade

and then reinstall the nvidia driver again which should be fixed by now by

sudo apt-get install nvidia-367