2

I installed Ubuntu Server 18.04 LTS as a VM. Then I installed Unity desktop with --no-install-recommends as in below command:

sudo apt install --no-install-recommends ubuntu-unity-desktop

Now I want to remove desktop and return my good old terminal screen. I tried removing desktop with following command and reboot but nothing was changed after reboot.

sudo apt remove --purge ubuntu-unity-desktop

Is there a way to remove desktop totally?

NK_
  • 317
  • 1
  • 3
  • 11

2 Answers2

4

ubuntu-unity-desktop is a metapackage that has dependencies on other packages. Simply removing the metapackage doesn't remove the dependencies.

Run sudo apt autoremove --purge after you remove the metapackage, because the other dependencies weren't manually defined for installation but were instead included because ubuntu-unity-desktop needed them, you need to autoremove the 'now not needed' dependencies pulled in.

Thomas Ward
  • 74,764
3

For the record - with Ubuntu 18.04 slowly losing importance:

On Ubuntu 22.04 i had to remove the package "ubuntu-desktop-minimal" followed by "apt-get autoremove" to remove 158 desktop related packages.

neuhaus
  • 133