2/15/18 compiz update broke unity

I have found a solution. apt-get fails to be able to handle the situation, but aptitude can handle it.

sudo aptitude install ubuntu-desktop

Note that the first solution offered by aptitude doesn't correct the problem, because that chooses not to install the package. I had to select no the first time, and then aptitude offered a second solution of downgrading the compiz packages that caused all the problems. The downgrade fixes the dependency problem, and then ubuntu-desktop and unity are reinstalled.


Very strange situation.
Yes compiz-core-abiversion-20151010 is virtual on xenial and zesty, but it is provided by compiz-core:

$ apt-cache show compiz-core  | grep "Version\|Provides\|Package"
Package: compiz-core
Version: 1:0.9.12.3+16.04.20180221-0ubuntu1
Provides: compiz-core-abiversion-20180221
Package: compiz-core
Version: 1:0.9.12.2+16.04.20160415-0ubuntu1
Provides: compiz-core-abiversion-20151010

So APT and dpkg knows about both of them.

Full list of compiz-core-abiversion family is as follows:

$ aptitude search compiz-core-abiversion-
v   compiz-core-abiversion-20151010                                -
v   compiz-core-abiversion-20151010:i386                           -
v   compiz-core-abiversion-20180221                                -
v   compiz-core-abiversion-20180221:i386                           -

Here as we know compiz-core-abiversion-20151010 is not installable:

$ sudo apt-get install compiz-core-abiversion-20151010
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package compiz-core-abiversion-20151010 is a virtual package provided by:
  compiz-core 1:0.9.12.2+16.04.20160415-0ubuntu1 [Not candidate version]

E: Package 'compiz-core-abiversion-20151010' has no installation candidate

But we can install newer (actual) version:

$ sudo apt-get install compiz-core-abiversion-20180221
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'compiz-core' instead of 'compiz-core-abiversion-20180221'
The following additional packages will be installed:
  compiz-gnome compiz-plugins compiz-plugins-default libcompizconfig0 libdecoration0 libunity-core-6.0-9 unity unity-schemas unity-services
The following packages will be upgraded:
  compiz-core compiz-gnome compiz-plugins compiz-plugins-default libcompizconfig0 libdecoration0 libunity-core-6.0-9 unity unity-schemas
  unity-services
10 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
Need to get 5 302 kB of archives.
After this operation, 278 kB of additional disk space will be used.
Do you want to continue? [Y/n] n

So on normal consistent system all we need is to have all upgrades installed.
But if unity package was removed, we can install it with:

sudo aptitude update
sudo aptitude safe-upgrade
sudo aptitude install unity ubuntu-desktop

Note 1: My Ubuntu 16.04 LTS installations with Unity and MATE DE (1 clean xenial and and 3 old precise->trusty->xenial) work normally after regular upgrades without my intervention. All these systems did not tried to remove neither Unity nor ubuntu-desktop during upgrades. And of course xenial-proposed is disabled on my system, since I do not want to transform my Ubuntu LTS to bleeding-edge self-breakable ArchLinux.

Note 2: I edited my answer 2018-03-12 because of the fact that compiz-core-abiversion-20170630 was removed from repositories.


Assuming you're logged in and your UI is stuck without unity, you can do the following:

  1. Go to tty4 using Ctrl+Alt+F4.
  2. Login.
  3. Install aptitude:

    sudo apt install aptitude
    
  4. Install unity using aptitude:

    sudo aptitude install unity
    

It will then tell you that there is a conflicting package. You answer 'n' and it will propose that you downgrade compiz. Go ahead and accept that.