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?
9 Answers
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 Psychocats (last page edit 04/2013).
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
There you find all applications of Lubuntu you need to remove to return to a pure distro:
Follow the commands for removing Lubuntu.

- 599

- 7,562
-
yeah, I noticed there were a lot of programs that were left installed. Thanks for the link. – rockr101 Feb 11 '12 at 01:21
-
6Why is it that desktop environment creators don't create a proper uninstaller for their DE? – zkent Dec 15 '13 at 02:07
-
@zkent - They probably won't mind creating an installer, just not an uninstaller.. – Wilf Feb 19 '14 at 08:57
-
@zkent because it would work if you used aptitude to install... – Mateo Jul 09 '15 at 14:45
-
1@zkent: Because the package manager is supposed to handle that. See the top part of Brian's answer. – David Foerster Jan 13 '17 at 18:11
In a Terminal type:
sudo apt purge --remove lxde*; sudo apt autoremove -y
or
sudo apt purge --remove lubuntu-*; sudo apt autoremove -y
That'll do it.

- 14,866
-
1I 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
-
5-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 06:35
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.

- 641
-
Is
sudo apt-get --purge autoremove lubuntu-desktop
ever enough on a system installed from a Lubuntu ISO? It works if LXDE was installed by installing thelubuntu-desktop
package on an existing system. It doesn't work if it was installed by installing thelubuntu-desktop
task usingtasksel
or by appending a^
to the name inapt
orapt-get
(I just tested this on a 14.04 system). And I don't really see why it would work in a system installed from a live CD. Users removeubuntu-desktop
all the time without causing most of their other packages to be subject to autoremoval. – Eliah Kagan Oct 28 '17 at 21:14 -
Can you please not have
sudo apt-get --purge autoremove lxde
as the first command to be displayed, with no qualifier that it will remove perfectly good packages that don't need to be removed? The warnings that it is 'dangerous' only come at the very end of your post. I lost connman and now can't even connect to the internet. – Cheetaiean Sep 27 '22 at 16:04
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.).

- 93,831
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

- 291
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.

- 458
- 5
- 7
To remove lubuntu-desktop completely from Ubuntu 18.10, use this gist
#!/bin/bash
# extracted list form /var/log/dpkg.log.*
# https://packages.ubuntu.com/bionic/amd64/lubuntu-desktop
sudo apt-get purge --remove -y \
gnumeric-common \
libgsf-1-common \
libgsf-1-114 \
libgoffice-0.10-10-common \
libgoffice-0.10-10 \
pxlib1 \
gnumeric \
libindicator7 \
libappindicator1 \
libbonobo2-common \
liborbit-2-0 \
libbonobo2-0 \
libglade2-0 \
libgnome-keyring-common \
libgnome-keyring0 \
libido-0.1-0 \
lightdm \
sgml-base \
libvo-aacenc0 \
libvo-amrwbenc0 \
abiword-common \
libchamplain-0.12-0 \
libchamplain-gtk-0.12-0 \
libwv-1.2-4 \
libabiword-3.0 \
libloudmouth1-0 \
libots0 \
libtelepathy-glib0 \
libtidy5 \
abiword \
link-grammar-dictionaries-en \
minisat \
liblink-grammar5 \
abiword-plugin-grammar \
audacious-plugins-data \
libaudcore5 \
libaudgui5 \
libaudtag3 \
libcue1 \
libfluidsynth1 \
libmms0 \
libmodplug1 \
libsidplayfp4 \
audacious-plugins \
audacious \
libxfce4util-common \
libxfce4util7 \
libxfce4panel-2.0-4 \
libxfce4ui-common \
xfconf \
libxfconf-0-2 \
libxfce4ui-2-0 \
xfce4-notifyd \
lubuntu-icon-theme \
gir1.2-appindicator3-0.1 \
blueman \
xml-core \
sgml-data \
docbook-xml \
libfcitx-utils0 \
libfcitx-config4 \
libfcitx-core0 \
libgettextpo0 \
fcitx-bin \
fcitx-data \
libpresage-data \
libpresage1v5 \
fcitx-modules \
fcitx \
fcitx-config-common \
libfcitx-gclient1 \
fcitx-config-gtk \
fcitx-config-gtk2 \
fcitx-frontend-all \
fcitx-module-dbus \
fcitx-frontend-gtk2 \
fcitx-frontend-gtk3 \
fcitx-frontend-qt4 \
libfcitx-qt5-1 \
fcitx-frontend-qt5 \
fcitx-module-kimpanel \
fcitx-module-lua \
fcitx-module-x11 \
fcitx-ui-classic \
libffmpegthumbnailer4v5 \
ffmpegthumbnailer \
freepats \
galculator \
gconf2-common \
libgconf-2-4 \
gconf-service-backend \
gconf-service \
gconf2 \
gdebi-core \
gdebi \
libgeoclue0 \
libnm-util2 \
libnm-glib4 \
geoclue \
geoclue-ubuntu-geoip \
libimlib2 \
giblib1 \
libuchardet0 \
libmpv1 \
gnome-mpv \
gnome-screensaver \
gnome-themes-standard \
gnumeric-doc \
gpicview \
libgssdp-1.0-3 \
libgupnp-1.0-4 \
libgupnp-igd-1.0-4 \
libnice10 \
gstreamer1.0-nice \
gtk2-engines \
gtklp \
libgucharmap-2-90-7 \
gucharmap \
libpanel-applet3 \
indicator-applet \
indicator-common \
indicator-application \
indicator-application-gtk2 \
libaccounts-glib0 \
liburl-dispatcher1 \
indicator-datetime \
liblightdm-gobject-1-0 \
indicator-keyboard \
indicator-messages \
indicator-power \
indicator-session \
leafpad \
libgnomevfs2-common \
libgnomevfs2-0 \
libgnome2-common \
libgnome-2-0 \
libgnomecanvas2-common \
libgnomecanvas2-0 \
libbonoboui2-common \
libbonoboui2-0 \
libburn4 \
libcompfaceg1 \
libde265-0 \
libept1.5.0 \
libexo-common \
libexo-helpers \
libexo-2-0 \
libexo-1-0 \
libserd-0-0 \
libsord-0-0 \
libsratom-0-0 \
liblilv-0-0 \
libmjpegutils-2.1-0 \
libmpeg2encpp-2.1-0 \
libmplex2-2.1-0 \
libofa0 \
libsoundtouch1 \
libsrtp2-1 \
libwildmidi-config \
libwildmidi2 \
libzbar0 \
gstreamer1.0-plugins-bad \
libfarstream-0.2-5 \
libfm-extra4 \
libmenu-cache-bin \
libmenu-cache3 \
libfm-data \
lxmenu-data \
libfm4 \
libfm-gtk-data \
libfm-gtk4 \
libfm-modules \
libprotobuf-c1 \
libgadu3 \
libgnomeui-common \
libgnomeui-0 \
libpango-perl \
libgtk2-perl \
libgtkmm-3.0-1v5 \
libjte1 \
libisofs6 \
libjpeg-turbo-progs \
libkeybinder0 \
libmeanwhile1 \
libobt2v5 \
libobrender32v5 \
system-tools-backends \
liboobs-1-5 \
libusb-0.1-4 \
libpisock9 \
libportaudio2 \
pidgin-data \
libzephyr4 \
libpurple0 \
libpurple-bin \
libwvstreams4.6-base \
libwvstreams4.6-extras \
libuniconf4.6 \
libunique-1.0-0 \
libunity-settings-daemon1 \
libwnck-common \
libwnck22 \
libxfce4ui-1-0 \
libxfce4util-bin \
light-locker \
light-locker-settings \
lightdm-gtk-greeter \
lightdm-gtk-greeter-settings \
lubuntu-artwork-18-04 \
lubuntu-lxpanel-icons \
lubuntu-artwork \
ttf-ubuntu-font-family \
lubuntu-default-settings \
lubuntu-default-session \
policykit-1-gnome \
gnome-system-tools \
libguvcview-2.0-2 \
guvcview \
indicator-sound \
indicator-sound-gtk2 \
lxpanel-data \
lxpanel \
lxsession-data \
lxpolkit \
xscreensaver-data \
xscreensaver \
lxlock \
lxsession-logout \
lxsession \
lxterminal \
openbox \
pcmanfm \
plymouth-theme-lubuntu-logo \
plymouth-theme-lubuntu-text \
xserver-xorg-input-synaptics \
lubuntu-gtk-core \
lxappearance \
lxappearance-obconf \
lxhotkey-core \
lxhotkey-gtk \
lxhotkey-plugin-openbox \
lxinput \
lxlauncher \
lxpanel-indicator-applet-plugin \
lxrandr \
lxsession-default-apps \
lxshortcut \
lxtask \
mtpaint \
obconf \
pavucontrol \
pidgin \
pinentry-gtk2 \
scrot \
sylpheed \
sylpheed-doc \
sylpheed-i18n \
sylpheed-plugins \
synaptic \
wvdial \
xfburn \
xfce4-power-manager-data \
xfce4-power-manager \
xfce4-power-manager-plugins \
xpad \
lubuntu-gtk-desktop \
lubuntu-desktop \
lxde-common \
openbox-lxde-session \
lxde-core \
lxhotkey-data \
mpv \
neofetch \
openbox-menu \
pastebinit \
pidgin-libnotify \
python3-pyxattr \
librarian0 \
rarian-compat \
ubuntu-touch-sounds \
unity-settings-daemon \
unity-greeter \
xfonts-100dpi \
libwebcam0 \
obsession \
phantomjs \
presage \
rtmpdump \
uvcdynctrl-data \
uvcdynctrl \
youtube-dl
sudo apt install --reinstall -y gdm3
sudo reboot

- 114,770

- 64
-
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Thomas Ward Jan 25 '19 at 20:14
-
+1 It helped to see that
obsession
could be removed from my xubuntu 18.04. – loved.by.Jesus Oct 20 '21 at 09:35 -
How would this help; the package list applies to a Lubuntu/LXDE release; however 18.10 & later are LXQt based thus don't have the packages listed in your paste. Any readers viewing this please ignore this answer as it's of little value; https://phab.lubuntu.me/w/bugs/ can be used to see some of the changes where you'll note the packages listed here apply up to 18.04 only; not 18.10 & later. (the github ref. says it's for bionic & not cosmic the answer states as it's all wrong for cosmic (18.10) or later!) – guiverc Jan 04 '22 at 12:18
-
@guiverc, Boss, don't ever vote before completely understanding the question and as well as the answer. – Ravi Misra Mar 29 '22 at 07:24
-
You start with "To remove lubuntu-desktop completely from Ubuntu 18.10" then the first package mentioned is
gnumeric-common
which isn't a Lubuntu package in 18.10. Your own comment says you extracted the list from a different release - where the package applies (ie. 18.04), but doesn't from 18.10 upwards. Your 'answer' is wrong, maybe because of careless typos. I'd have to go to 3rd party site cosmic manifest, but look at this focal manifest - https://cdimage.ubuntu.com/lubuntu/focal/daily-live/current/focal-desktop-amd64.manifest and you won't findgnumeric
on anything past 18.04 – guiverc Mar 29 '22 at 07:30 -
If your answer hadn't mentioned 18.10, and only mentioned 18.04 then I'd have no issue (after all then it would be correct, and appropriate for a LXDE question/desktop), but you start by referencing a LXQt Lubuntu system.... (from 18.10 up the answer/list is very different if you check to the bionic list you based your answer on!) – guiverc Mar 29 '22 at 07:36
First, check what is going to be removed
sudo dpkg -l | grep .lxde.
If you are ok with it, run this command
sudo apt autoremove --purge lxde*
Command explanation
# dpkg -l lists all installed packages
# grep .lxde. filters, so that only packages with keyword lxde within their names, listed
# purge removes mentioned package
# autoremove tries to remove dependency packages

- 129
- run
sudo tasksel
- choose/check appropriate distribution lets say you want Ubuntu Desktop back
- deselect Lubuntu Desktop.
- Hit Enter or Press OK to proceed to installation process.
Regards Jamil