Did you lose your Ubuntu 16.04 “Unity” desktop after apt-get dist-upgrade?

On 15 February, an update to compiz was pushed out by Ubuntu that triggered the removal of ubuntu-desktop, unity, and (on my system, at least) unity-tweak-tool.

The result: rebooting after doing an apt-get dist-upgrade leaves you with no desktop environment.

The fix: use aptitude to trigger a downgrade of the relevant compiz packages (first you might need to use Ctrl+Alt+F1 to get a terminal session, and you might need to install aptitude too).

Here are the commands I needed:

$ sudo apt-get install aptitude
$ sudo aptitude install ubuntu-desktop unity unity-tweak-tool

Reject the first “solution” offered by aptitude, and when it offers to downgrade compiz, accept. Then, if needed:

$ sudo reboot