Get rid of Unity in Ubuntu 16.04 LTS

So if you are one of those who want to get rid of Unity desktop manager. Then follow along! I am installing Trinity Desktop Manager, but you can install any DM of your choice. I recommend 15+ GB for your installation, and we'd have only one OS. I am assuming that you are about to install Ubuntu 16.04 LTS. This might just work for 18.04 LTS release, but I have not tried. I am using Oracle Virtual Box and here is my VM configuration:

Your VM configuration does not have to be identical. Because, we will be throwing few GB of packages later, I'd recommend not to download updates and 3rd party software, you can do it later, save time and your internet bandwidth, I did not even bother to install Virtual Box Guest Editions software on my Ubuntu. Ignore Software Updater prompt by clicking Remind me later. After you are done installing and booted your brand new Ubuntu 16.04 LTS installation for the first time, open your terminal by pressing (Ctrl+Alt+T) :

sudo nano /etc/apt/sources.list

now append following lines to sources.list

deb http://mirror.ppa.trinitydesktop.org/trinity/trinity-r14.0.0/ubuntu xenial main
deb-src http://mirror.ppa.trinitydesktop.org/trinity/trinity-r14.0.0/ubuntu xenial main
deb http://mirror.ppa.trinitydesktop.org/trinity/trinity-builddeps-r14.0.0/ubuntu xenial main
deb-src http://mirror.ppa.trinitydesktop.org/trinity/trinity-builddeps-r14.0.0/ubuntu xenial main

Add the GPG signing key

sudo apt-key adv --keyserver keyserver.quickbuild.io --recv-keys F5CFC95C

Now we get 7.5 GB back! .... by deleting a few packages:

sudo apt-get remove unity lightdm ubuntu-desktop
sudo apt-get update

Now, kiss goodbye to Unity ...

sudo reboot

Upon reboot you will be greeted with a terminal login, CLI, not GUI. First install all upgrades using the first command below. This could take a while - depending on your system and/or VM configuration and the internet speed. The && chains the commands and the -y helps you keep pressing Y during these commands. So you can run these commands unattended after typing them. At this point you can hit Alt + F2/3/4 to switch to different terminal, login as the same user or different user and still use the computer.

Now, let's first install & configure the new DM (Desktop Manger). After that, we need to reconfigure our DM to let Ubuntu know, that we have installed Trinity. So login and then run the second command. You might.

# upgrade
sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y

#install - 1 GB download
sudo aptitude install kubuntu-default-settings-trinity kubuntu-desktop-trinity

# configure
sudo dpkg-reconfigure gdm
sudo reboot

Sources