Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to completely remove Unity-2D (not Unity) on Ubuntu Precise Pangolin 12.04. I used dpkg -l | grep unity-2d to list the packages which belongs to Unity-2D. The result was this:

 ii  libunity-2d-private0    5.12.0-0ubuntu1.1    Unity 2D shared library
 ii  unity-2d                5.12.0-0ubuntu1.1    Unity interface for non-accelerated graphics cards
 ii  unity-2d-common         5.12.0-0ubuntu1.1    Unity 2D Panel
 ii  unity-2d-shell          5.12.0-0ubuntu1.1    Dash and Launcher for the Unity 2D environment
 ii  unity-2d-spread         5.12.0-0ubuntu1.1    Unity 2D Spread

Now I want to remove those packages with:

 sudo apt-get purge unity-2d unity-2d-common unity-2d-panel unity-2d-shell unity-2d-spread libunity-2d-private0

Then I get a the following message:

The following packages will be REMOVED:
  libunity-2d-private0* ubuntu-desktop* unity-2d* unity-2d-common* unity-2d-panel* unity-2d-shell* unity-2d-spread*

which means that the package ubuntu-desktop should also removed. But the decription from that package apt-cache show ubuntu-desktop says:

Description-en: The Ubuntu desktop system
 This package depends on all of the packages in the Ubuntu desktop system
 It is also used to help ensure proper upgrades, so it is recommended that
 it not be removed.

that it should not be removed, because it is needed to ensure a successful system-update.

How can I remove Unity-2D without removing Ubuntu-Desktop?

share|improve this question
up vote 4 down vote accepted

It is perfectly okay to remove ubuntu-desktop package if you want to remove Unity and Unity-2D. Because ubuntu-desktop is a meta package and used to pull the standard packages in an Ubuntu Desktop installation. Since you are removing a dependency of Ubuntu-Desktop package, it will be removed too.

But, you don't need to worry. You won't lose anything by removing it. You might take a look at this question.

For the specific query:

How can I remove Unity-2D without removing Ubuntu-Desktop?

You just cannot. There is no way to have Ubuntu-Desktop package with Unity-2D removed without being please with a broken package system.

share|improve this answer
I don't want to remove unity. – BuZZ-dEE Sep 28 '12 at 11:29
@BuZZ-dEE ok, both are same, just remove unity-2d. – Anwar Shah Sep 28 '12 at 11:31

Remove or modify the file /usr/share/xsessions/ubuntu-2d.desktop. For example, do

sudo mv /usr/share/xsessions/ubuntu-2d.desktop /root/ubuntu-2d.desktop.backup

Unfortunately, you cannot selectively remove the 2D libraries from the system without breaking the dependencies, because the authors of Ubuntu decided that 2D is mandatory for Ubuntu.

EDIT: If you want to remove Unity-2D (but only Unity-2D, not anything else), there are two strategies:

  1. Go with loosing Unity-Desktop. This will not remove the other unity libraries, as Unity-Desktop is just a meta-package, it's purpose is to depend on a large number of other packages such that by installing this single package, you also install all these dependencies.

  2. (much, much harder) Create a dummy meta-package that provides the Unity-2D package, but does not install any files.

share|improve this answer
I removed /usr/share/xsessions/ubuntu-2d.desktop, but it doesn't solve the problem. – BuZZ-dEE Sep 28 '12 at 11:19
If your problem is that people can log in with ubuntu 2D, then yes, it does solve it (you need to log out or restart lightdm for the changes to take effect). If not, then what other reasons do you have to remove ubuntu-2d? – January Sep 28 '12 at 11:23
No, that is not my problem. I want to completely remove Unity-2d from my system. – BuZZ-dEE Sep 28 '12 at 11:26
There is no unity-desktop meta-package, apt-cache search unity-desktop finds nothing. – BuZZ-dEE Feb 23 '13 at 0:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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