1

I am using lubuntu 16.10 on my laptop , and I want to remove the lubuntu desktop and replace it with it's xubuntu equivalents.

after installing the xubuntu-desktop package I tried to remove the lubuntu desktop by running the following commands

sudo apt-get purge lubuntu-desktop

and

sudo apt-get purge lxde

but both commands return

package not installed, so not removed

so my question is How do I remove the entire lubuntu desktop environment from lubuntu?

Thank you.

David Foerster
  • 36,264
  • 56
  • 94
  • 147
  • Run apt update, try again and please edit your question to include the actual terminals output. – xangua Jan 13 '17 at 17:50
  • i've already run ´apt update´ and terminal output is ´package is not installed, so not removed´ –  Jan 13 '17 at 17:54
  • To search for installed packages, try apt search --installed "*lxde*" and apt search --installed "*lubuntu*" – ridgy Jan 13 '17 at 17:59
  • 1
    The short answer is you don't. Desktop Environments are multiple packages put together. It's relatively easy to install an additional one to any Ubuntu flavor but very hard to get rid of once installed. Uninstalling the meta-package only removes itself, not any of the packages installed with and by it. You'd have uninstall all of them and then you'd end up in a dependencies caos. –  Jan 13 '17 at 17:59
  • 6
    Possible duplicate of Completely Remove LXDE/Lubuntu Desktop Environment. The accepted answer is rather useless (see its comments for an explanation) but the top part of Brian's answer should do what you want. The trick is to use Apt's "autoremove" command. – David Foerster Jan 13 '17 at 18:10
  • Just leave it as it is difficult to remove. – Panther Jan 13 '17 at 18:31

1 Answers1

1

Try this:

Start in text-only mode

Switch on your computer. Wait until the BIOS has finished loading, and press and hold Shift, which will bring up the Grub menu.

Select the line which starts with Advanced options.

Select the line ending with (recovery mode)

Press Return and your machine will begin the boot process.

After a few moments, your PC should display a menu with a number of options, including Drop to root shell prompt. Press Return with this option highlighted.

The PC will start in a terminal.

Run these commands:

Mount partitions in read-write mode

mount -o remount,rw /
mount --all

Update repositories

apt-get update

Install aptitude and deborphan

apt-get install --reinstall aptitude deborphan

Eliminate the components of lxde that are not necessary in xubuntu

aptitude remove '?and(?reverse-depends(lxde),?not(?reverse-depends(?exact-name(xubuntu-desktop))))'
aptitude remove '?and(?reverse-depends(lubuntu),?not(?reverse-depends(?exact-name(xubuntu-desktop))))'

Reinstall xubuntu-desktop

apt-get install --reinstall xubuntu-desktop

Eliminate orphan packages

deborphan
apt-get --purge remove $(deborphan)
deborphan --libdevel
apt-get --purge remove $(deborphan --libdevel)
deborphan --find-config
dpkg --purge $(deborphan --find-config)

Remove unnecessary packages

apt-get autoremove

Remove downloaded packages

apt-get clean

Restart system

reboot
kyodake
  • 15,401