Ubuntu – Ubuntu GUI is broken after updates

16.04aptdependenciesdesktop-environmentsgui

There were updates offered by Ubuntu and I installed them. After that the Ubuntu desktop GUI hasn't been working correctly and it freezes frequently. Moreover, instead of having the Ubuntu startup screen like below, only a blank gray screen comes, then on the desktop instead of wallpaper, only a black background is applied.

enter image description here

I also tried this sudo apt-get install ubuntu-desktop but get thee results shown below.

The following packages have unmet dependencies:
 ubuntu-desktop : Depends: checkbox-gui but it is not going to be installed
                  Recommends: python3-aptdaemon.pkcompat but it is not going to be installed
                  Recommends: unity-webapps-common but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I tried to install checkbox-gui, then it gives another unmet dependencies error message, than another then another.

here is another screenshot of the Ubuntu desktop right now,
enter image description here

Best Answer

TL;DR:

Always remove PPAs with ppa-purge

Whole story:

Yesterday I wanted to try KDE Plasma and I installed it with following commands:

sudo add-apt-repository ppa:kubuntu-ppa/backports
sudo apt-get update && sudo apt-get dist-upgrade
sudo apt-get install kubuntu-desktop

After hour I decided to switch back to Unity and remove KDE:

sudo add-apt-repository --remove ppa:kubuntu-ppa/backports
sudo apt-get update && sudo apt-get dist-upgrade
sudo apt-get remove --purge kubuntu-desktop

After login I was facing few problems, so I tried reinstalling ubuntu-desktop and unity, but I was getting error:

The following packages have unmet dependencies:
 ubuntu-desktop : Depends: checkbox-gui but it is not going to be installed
                  Recommends: python3-aptdaemon.pkcompat but it is not going to be installed
                  Recommends: unity-webapps-common but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Some digging and I found out what cause it: removing PPA does not downgrade packages. The solution was to add it again and execute:

sudo apt-get install ppa-purge
sudo ppa-purge ppa:kubuntu-ppa/backports

And then I was able to reinstall ubuntu-desktop :)

Related Question