26

I need to get rid of the GNOME Desktop Environment which has been installed by default when I updated my pc from 15.10 to 16.04.

After a while, I found myself not only with GNOME DE, but also with Cinnamon alongside (in the login screen, I could choose at least five or six DE!)

Now I am using Unity, and I'm happy with that, and I successfully uninstalled Cinnamon, but now I'm afraid that after uninstalling GNOME I will mess up the Unity DE, since I see many packages running in unity with the packagename starting with gnome-... Would someone mind to help me? Thx in advance

5 Answers5

44

To be honest it would be better to back up for files and all config files in the Home folder and do a fresh install of Ubunutu.

If not try this:

Start by running this command:

Uninstall just ubuntu-gnome-desktop

sudo apt-get remove ubuntu-gnome-desktop
sudo apt-get remove gnome-shell 

This will remove just the ubuntu-gnome-desktop package itself.

Uninstall ubuntu-gnome-desktop and it's dependencies

sudo apt-get remove --auto-remove ubuntu-gnome-desktop

This will remove the ubuntu-gnome-desktop package and any other dependant packages which are no longer needed.

Purging your config/data too

If you also want to delete your local/config files for ubuntu-gnome-desktop then this will work.

Caution! Purged config/data can not be restored by reinstalling the package.

sudo apt-get purge ubuntu-gnome-desktop

Or similarly, like this ubuntu-gnome-desktop

sudo apt-get purge --auto-remove ubuntu-gnome-desktop

Then run:

sudo apt-get autoremove 

to remove extra packages and dependencies no longer needed on your system.

You might (or might not, depending on if gdm was removed already) need to use these commands to change your login screen back to Unity's default (which is lightDM) run

sudo dpkg-reconfigure gdm

Hit enter at the prompt and then select lightdm from the options. After that you can remove gdm with

sudo apt-get remove gdm  

Finally run:

sudo apt-get install ubuntu-desktop
sudo apt-get install unity

INFO HERE and HERE

pst007x
  • 8,052
  • Thx, if something goes wrong I will repost and update the situation – Aldo Dadone May 04 '16 at 16:06
  • Done it, the gnome-ubuntu-desktop wasn't inside my pc already, but when I tried to log out and then checked the ubuntu logo (unity de by default) I still saw that I could choose between 4 total DE: Unity, Gnome, Gnome (Compiz), Gnome(Meta-something now I can't remember). Can you still help me? – Aldo Dadone May 04 '16 at 16:37
  • Try sudo apt-get remove gnome-shell – pst007x May 07 '16 at 14:58
  • When I try this I have a problem: I can't login to ubuntu.

    I solved this problem when I change my default desktop environment from gnome to unity.

    – mrroot5 Feb 21 '17 at 11:03
  • My problem was memory consuming of gnome hence removed it by this answer then reboot the system to stop the related process. The memory usage reduced by approximately 4.2GB of ram. – M. Rostami Oct 02 '20 at 19:34
7

You can see all Gnome package list by :

apt list --installed | grep gnome

then remove your arbitary package by :

apt-get remove <package name>

or remove all packages by:

sudo apt-get remove $(apt list --installed "gnome*" 2>/dev/null | awk -F'/' 'NR>1{print $1}')
Ehsan Jelodar
  • 171
  • 1
  • 3
3

I also like the user interface of Unity desktop environment, so try these beautiful steps...

Step 1 : This will remove all gnome related things.

sudo apt-get remove nautilus nautilus-* gnome-power-manager gnome-screensaver gnome-termina* gnome-pane* gnome-applet* gnome-bluetooth gnome-desktop* gnome-sessio* gnome-user* gnome-shell-common zeitgeist-core libzeitgeist* gnome-control-center gnome-screenshot gnome* && sudo apt-get autoremove

Step 2 : This will remove all snap applications, if you don't do this step then you will see that there are 2 same apps some app (like 2 system-monitors, 2 terminals, 2 calculators etc) after installing unity. so run bellow code without any worry.

sudo apt autoremove --purge snapd

Step 3 : Now connect your system to a WI-FI to install Unity .

sudo apt install ubuntu-unity-desktop

Step 4 : After successful installation, reboot your system. You may have a problem that tap to click not working after replacing Gnome with Unity. If so then run below code to solve that problem..

sudo apt install xserver-xorg-input-synaptics

Now reboot your system and Login again.

0

First, check what is going to be removed

sudo dpkg -l | grep .gnome.

If you are ok with it, run this command

sudo apt autoremove --purge gnome*

Command explanation

# dpkg -l       lists all installed packages
# grep .gnome.   filters, so that only packages with keyword gnome within their names, listed
# purge         removes mentioned package
# autoremove    tries to remove dependency packages
Pran
  • 129
0

Reboot your system and press Control-Alt-F1 to get to a text terminal. Log in there and type the following:

sudo apt-get install ubuntu-desktop

sudo apt-get install --reinstall lightdm