HOWTO: Completely Remove ubuntu-desktop


The Ubuntu-Desktop package install a lot more than Gnome. And it has been extremely difficult to remove completely, for me at least, until I found this post on UF.

 sudo apt-cache search ubuntu-desktop|grep Depends:|sed s/Depends:\ // |sed s/,//|xargs sudo apt-get remove --purge 

That will painlessly remove everything installed by the ubuntu-desktop package, by un-installing all dependancies. Change “depends” to “recommends” to remove recommended packages, or just run

 sudo apt-get autoremove 

8 Responses to “HOWTO: Completely Remove ubuntu-desktop”

  1. 1 omns

    I guess the problem then lies in how you put back some packages. So many now drag in ubuntu-desktop as a recommend it becomes hard work to keep it out of the way. You really shouldn’t have to often use –no-install-recommends to work around this.

    • 2 evidex

      Ya, it can be difficult for those trying to live without Gnome dependencies alright >.<

    • 3 pickles

      Yes, recommends have become horribly abused, to the point that it’s best to not install them implicitly. Fortunately, you needn’t use the –no-install-recommends switch every time:

      echo ‘APT::Install-Recommends “0”;’ >> /etc/apt/apt.conf

  2. When ever i am remove kubuntu plasma desktop in my laptop and its shows your software was completed removed, but after i am restart my laptop their i saw kubuntu option in login panel. please help me. how can i completed remove kubuntu.

  3. 6 Teo

    sudo apt-cache search ubuntu-desktop|grep Depends: | sed s/Depends:\ // |sed s/,//g | xargs sudo apt-get -y remove –purge

    Cheers!! 😉

  4. 7 Dedec H

    Shouldn’t it be apt-cache show instead of search?

  5. 8 luser

    using the search option didn’t work for me, but the depend option did, I suspect depends works as well

%d bloggers like this: