5

I have installed gnome-shell and want to remove ubuntu-desktop. How do I do that without destroying gnome-shell? Because, right now, I got many duplicates, e.g. two software updater and two system settings.

11

First, install the full ubuntu-gnome-desktop metapackage to get all that comes with the full ubuntu-gnome-desktop:

sudo apt-get update
sudo apt-get install ubuntu-gnome-desktop

Next, remove the ubuntu-desktop:

sudo apt-get remove ubuntu-desktop unity && sudo apt-get autoremove

or, if you would like to remove the configuration files as well

sudo apt-get purge ubuntu-desktop unity unity-greeter && sudo apt-get autoremove

Just BE CAREFUL to review the list of programs to uninstall before selecting "Y" to accept the changes to ensure sure you are not uninstalling something you want to keep or need!!!

If there are any applications you want or need to keep that are to be removed, do not except the changes and instead, press CRTL + C to exit the command and then explicitly install these applications using sudo apt-get install to mark these wanted or needed applications as selected. After doing this, run sudo apt-get autoremove again and once more, review the list of applications to be removed to verify before accepting the changes to the system.

| improve this answer | |
  • I also had to remove rm /etc/init/lightdm.conf – Stanislav May 28 '15 at 18:26
  • @Stanislav That is a result of the unity-greeter; I have included that in the uninstall command. On the newer versions, lightdm.conf is now depreciated and there should be a file /etc/lightdm/lightdm.conf.d/50-unity-greeter.conf. Alternatively, gnome doesn't use lightdm so if you run dpkg-reconfigure gdm and you can select gdm to be the default display manager. – mchid Jun 1 '15 at 17:59
  • don't run this command if you like your ubuntu os being able to connect to a network as it auto removes network-manager-gnome along with network-manager – James Kirkby Apr 26 '16 at 12:03
  • @JamesKirkby I'm sorry to hear this happened to you, apt-get is certainly not perfect. Let me just say that what you experienced is quite un-typical on Ubuntu at least (more common on Debian) and should not occur on a normally configured Ubuntu system. With that said, I cannot stress enough that whenever running any apt-get command, you should never, ever type Y and press enter without first reviewing the changes to be made to the system. If you don't agree with the changes to be made, type -n or press CTRL+C to exit the command. You should also never include the -y flag ever. – mchid Apr 27 '16 at 11:50
  • 1
    Ah, i see what's missing. You want to install ubuntu-gnome-desktop package. Gnome-shell by itself just gives GUI – Sergiy Kolodyazhnyy Apr 27 '16 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.