Score:1

How do I remove alternate desktop environment software

hk flag

I have used Ubuntu for a while a recently installed Lubuntu Desktop on top and gave it a shot. I quickly found out that I prefered the default GNOME Environment and uninstalled it through the terminal using sudo apt remove lubuntu-desktop and it fixed the majority of the problem. However I still have LXTerminal, Some Default Games, Image and Package Managers, ect. I cannot uninstall them through the Ubuntu Store (because they don't show up) and I really don't know how to find the names for each of the applications to uninstall them through Terminal and they take up a massive portion of HDD and my Show Applications is MASSIVE. Does anyone know how to fix my problem. Cheers :)

guiverc avatar
cn flag
Please note no supported release of Lubuntu uses `lxterminal` as it was a terminal intended for LXDE, and the oldest supported release for *flavors* is 20.04 where Lubuntu used LXQt. If you've manually installed any package (inc. `sudo apt install --reinstall`) in attempts to fix issues; those packages will not be removed when you removed a desktop, as they're marked as manually installed (likewise any *dep* they require). Lubuntu also only has 1 game for an install; and a full Lubuntu install is <6.5GB on disk.
guiverc avatar
cn flag
You can use a command on the terminal to view the packages that are installed when you added `lubuntu-desktop`, or you can look online at https://packages.ubuntu.com/ but you didn't provide release details so we don't know which you're asking about. You can also look at your `apt` history (`/var/log/apt/history.log`)... If all you installed was `lubuntu-desktop` then all you'll need to remove is `lubuntu-desktop`, but commands subsequent to that can change what is required to be removed.
Score:1
cn flag

There is afaik no other way than to manually remove the extra packages.

A metapackage such as lubuntu-desktop pulls in all packages that are deemed essential for a Lubuntu desktop, and that are currently not installed. Several top level packages are marked as "manually installed", even though they have been pulled in by the metapackage. That allows to selectively remove some components (e.g. the terminal emulator if you wish to use another one) without taking the entire desktop down on the next "autoremove". The drawback if this is that you cannot automatically remove every single package again that was installed through the metapackage.

Thus, you essentially need to manually remove remaining packages. A great help may be to list manually installed packages. Start removing all packages you recognize as Lubuntu programs. It is good in this context to use sudo apt purge, because that will also remove any system wide configuration files that may have been installed along. Once some packages are removed, a sudo apt autoremove will remove all libraries they used which are not anymore used elsewhere.

When removing a package, apt may list other packages that also are going to be removed, and ask confirmation to proceed. Carefully inspect that list:

  • if you see it will also remove ubuntu-desktop, then you know that package also belongs to the default Ubuntu desktop
  • if the list is very long, you probably are trying to remove an important package on which many packages depend.

Alternatively, a very nice tool to inspect your system at the package level is Synaptic package manager. There is a section "Installed (manual)" which will list mainly top level packages. Dependent libraries are typically automatically installed, and you will remove these later automatically with sudo apt autoremove.

Precaution to take when installing another desktop environment

Next time you install an additional desktop environment, copy and paste the list of packages that is going to be installed. Then you can use that list to remove, better purge, exactly all of them if you want to.

Score:0
us flag

Those packages were installed as dependencies of lubuntu-desktop package.

sudo apt autoremove should remove them.

You can find a list of all the dependencies here, and you can use it to selectively remove packages (but apt autoremove should automatically remove the redundant dependencies).

vanadium avatar
cn flag
That will not be the case. Not all dependencies of a metapackage are marked as "automatically installed". That is because you should be able to remove a metapackage (aimed as a shortcut to install the entire desktop) without bringing down the system by the next autoremove.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.