Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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've install LXDE on my laptop due to Unity's disappointing performance. But now, I want to completely remove LXDE including it's entire list of programs that came installed with it. How do I go about doing so?

share|improve this question
up vote 2 down vote accepted

In a Terminal type:

sudo apt-get purge lxde

That'll do it.

or Open up the Software Center and look for the package lxde and uninstall it.

lxde is a meta-package, install it will install everything lxde, removing it will remove everything it installed.

share|improve this answer
1  
I did that and did the 'autoremove' command to clear out the installed software that came with it. Thanks – rockr101 Dec 10 '11 at 16:02
1  
-1 "[…] removing it will remove everything it installed." – This is wrong. Removing a meta-package doesn't automatically remove "orphaned" installed packages, that are a dependency of the meta-package. You need to run apt-get autoremove afterwards to do that. – David Foerster Aug 27 '15 at 6:35

Removing the metapackage will only remove some stuff, but not all. You have to individually remove all the programs LXDE came with. I followed the up-voted comment above about using apt-get. But afterward, I still had pcmanfm, openbox stuff, lxterminal etc.

The best instructions I found are at: http://www.psychocats.net/ubuntu/puregnome

sudo apt-get remove abiword abiword-common abiword-plugin-grammar abiword-plugin-mathview ace-of-penguins audacious audacious-plugins audacious-plugins-data blueman catfish chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg elementary-icon-theme fonts-lyx galculator gdebi gdebi-core gecko-mediaplayer giblib1 gnome-desktop-data gnome-icon-theme-full gnome-mplayer gnome-system-tools gnome-time-admin gnumeric gnumeric-common gnumeric-doc gpicview gtk2-engines-pixbuf guvcview hardinfo indicator-application-gtk2 leafpad libaacs0 libabiword-2.9 libass4 libaudclient2 libaudcore1 libavcodec53 libavformat53 libavutil51 libbinio1ldbl libbluray1 libbs2b0 libcddb2 libcolamd2.7.1 libcompfaceg1 libcue1 libdca0 libdirectfb-1.2-9 libenca0 libept1.4.12 libexo-1-0 libexo-common libexo-helpers libfaad2 libfluidsynth1 libfm-data libfm-gtk-bin libfm-gtk-data libfm-gtk3 libfm3 libgdome2-0 libgdome2-cpp-smart0c2a libglade2-0 libgmlib0 libgmtk0 libgmtk0-data libgoffice-0.8-8 libgoffice-0.8-8-common libgsf-1-114 libgsf-1-common libgsm1 libgtkmathview0c2a libgtkspell0 libguess1 libid3tag0 libimlib2 libindicate-gtk3 libjpeg-progs libjpeg-turbo-progs liblink-grammar4 libloudmouth1-0 libmenu-cache1 libmms0 libmodplug1 libmowgli2 libmp3lame0 libmpg123-0 libmusicbrainz3-6 libnet-dbus-perl libobrender27 libobt0 libonig2 liboobs-1-5 libopts25 libots0 libpisock9 libpostproc52 librarian0 libresid-builder0c2a libschroedinger-1.0-0 libsdl1.2debian libsidplay2 libswscale2 libtidy-0.99-0 libtie-ixhash-perl libts-0.0-0 libuniconf4.6 libva1 libvdpau1 libvpx1 libvte-common libvte9 libwebcam0 libwv-1.2-4 libwvstreams4.6-base libwvstreams4.6-extras libxfce4ui-1-0 libxfce4util-bin libxfce4util-common libxfce4util6 libxfconf-0-2 libxml-parser-perl libxml-twig-perl libxml-xpath-perl libxvidcore4 lightdm-gtk-greeter link-grammar-dictionaries-en lm-sensors lp-solve lubuntu-artwork lubuntu-artwork-12-10 lubuntu-core lubuntu-default-settings lubuntu-desktop lubuntu-icon-theme lubuntu-lxpanel-icons lubuntu-software-center lxappearance lxappearance-obconf lxinput lxkeymap lxlauncher lxmenu-data lxpanel lxpanel-indicator-applet-plugin lxrandr lxsession lxsession-data lxsession-edit lxshortcut lxtask lxterminal mplayer2 mtpaint ntp obconf openbox openbox-themes pcmanfm pidgin pidgin-data pidgin-libnotify pidgin-microblog plymouth-theme-lubuntu-logo plymouth-theme-lubuntu-text python-pysqlite2 python-support python-xklavier rarian-compat scrot sylpheed sylpheed-doc sylpheed-i18n sylpheed-plugins synaptic system-tools-backends transmission tsconf uvcdynctrl uvcdynctrl-data wvdial xfburn xfce-keyboard-shortcuts xfce4-notifyd xfce4-power-manager xfce4-power-manager-data xfconf xfonts-100dpi xpad xscreensaver xscreensaver-data && sudo apt-get install ubuntu-desktop && sudo /usr/lib/lightdm/lightdm-set-defaults -g unity-greeter

Follow the commands for removing Lubuntu.

share|improve this answer
    
yeah, I noticed there were a lot of programs that were left installed. Thanks for the link. – rockr101 Feb 11 '12 at 1:21
4  
Why is it that desktop environment creators don't create a proper uninstaller for their DE? – zkent Dec 15 '13 at 2:07
    
@zkent - They probably won't mind creating an installer, just not an uninstaller.. – Wilf Feb 19 '14 at 8:57
    
@zkent because it would work if you used aptitude to install... – Mateo Jul 9 '15 at 14:45

I would go through dpkg.log to see all "install" actions, with

awk '$3 == "install"' /var/log/dpkg.log | less

search for lxde and take all packages near this by timestamp. You could need to look into older log too (dpkg.log.1, dpkg.log.2.gz, etc.).

share|improve this answer
    
Thanks for the reply but that seems very confusing to me – rockr101 Dec 10 '11 at 16:02

I realize this is an old question, but still relative to whomever stumbles across it.

In the following, replace PACKAGENAME with your package.

Make a BACKUP!

Before trying anything below, TRY THIS FIRST:

sudo apt-get --purge autoremove PACKAGENAME

For LXDE:

sudo apt-get --purge autoremove lxde

For Lubuntu-Desktop:

sudo apt-get --purge autoremove lubuntu-desktop

If this worked you don't need the rest.

The most thorough, method I've ever come up with to completely remove a package PLUS its dependencies PLUS all configs including those configs of dependencies and do a little housecleaning is this:

The following procedures can remove things you might still want/need. If that happens you'll definitely notice and should be able to just reinstall them as needed. Make a BACKUP!

Also pay close attention to what is listed to be removed before pressing "Y"

With all of these you can simulate what will happen by adding --simulate or -s before purge like so:

sudo apt-get --simulate --purge PACKAGENAME

STEP ONE: purge the main package (this isn't needed if you ran --purge autoremove above):

sudo apt-get purge PACKAGENAME

STEP TWO: Choose what else to purge...

Option 1: Purge the Depends AND Recommends (kinda dangerous):

sudo apt-get purge $(apt-cache depends PACKAGENAME | grep -E 'Depends || Recommends' | awk '{ print $2 }' | tr '\n' ' ')

Option 2: Purge ONLY the Depends (not as dangerous):

sudo apt-get purge $(apt-cache depends PACKAGENAME | grep Depends | awk '{ print $2 }' | tr '\n' ' ')

Option 3: Purge everything (most dangerous):

sudo apt-get purge $(apt-cache depends PACKAGENAME | awk '{ print $2 }' | tr '\n' ' ')

STEP THREE: Clean up:

sudo apt-get autoremove
sudo apt-get update
sudo apt-get check
sudo apt-get -f install
sudo apt-get autoclean

I do this anytime I add a "DE" and want to go back. Just recently I used this on GNOME and it even fixed the fact that only purging Gnome with autoremove after will still left my GRUB changed as well. This works especially well for meta packages. I run the last command "sudo apt-get -f install" at the end to check for possible broken packages and fix them after making so many changes all at once.

If you've ran apt-get install lubuntu-desktop to add the packages then you'll need do the following because just purging lubuntu-desktop and running an autoremove doesn't completely remove everything and leaves you with, still, a "Lubuntu" option in your display manager at login:

  • Log out from the desktop and press Ctrl+Alt+F1 then login to TTY1 and run the following commands.

    sudo apt-get purge lubuntu-desktop
    sudo apt-get purge $(apt-cache depends lubuntu-desktop | awk '{ print $2 }' | tr '\n' ' ')
    sudo apt-get autoremove
    sudo apt-get update
    sudo apt-get check
    sudo apt-get -f install
    sudo apt-get autoclean
    
  • Restart

    sudo shutdown -r now
    

If you've ran apt-get install lxde to add the package and had problems with remaining packages even after autoremove as seen with lubuntu-desktop you can run the same commands as above but replace "lubuntu-desktop" with "lxde" but I can't confirm this is needed.

share|improve this answer

I extended on enzotib's solution to get a one-liner to remove all the packages I had installed from a specific day (2015-05-12)

sudo apt-get purge $(awk '$3 == "install"' /var/log/dpkg.log | grep 2015-05-12 | awk '{ print $4 }' | tr '\n' ' ')

Awkish, but worked well.

share|improve this answer

Also, if you still have the LXDE option at login, run the following two commands in your terminal

cd /usr/share/xsessions

Then

sudo rm LXDE.desktop openbox.desktop
share|improve this answer
  1. run sudo tasksel
  2. choose/check appropriate distribution lets say you want Ubuntu Desktop back
  3. deselect Lubuntu Desktop.
  4. Hit Enter or Press OK to proceed to installation process.

Regards Jamil

share|improve this answer

Your Answer

 
discard

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.