2

I have installed Lubuntu on the top of Ubuntu and I want to get rid of all things that are just related only to Ubuntu to free up some space on my drive. But I don't know how to achieve this.

I have read this guide but it seems outdated and the command does not do much.

I'm using Ubuntu 19.04.

  • 2
    It would be so much simpler and cleaner to back up your personal data (which you should do in any case) and then to do a clean install of whichever flavor you decide on. If you don't want to do so, compare the manifests of Ubuntu available here and that of Lubuntu available here and use that information to delete applications present only in Ubuntu. – DK Bose May 8 at 9:49
3

I don't know anything about your machine's specifications, your needs, or your experience and the following maybe inappropriate or not applicable.

  • If you feel you need support, Ubuntu maybe a better option than Lubuntu for two reasons. One, there are, in my opinion, more Ubuntu users here than there are Lubuntu users. Two, Lubuntu, from 18.10 onward, uses LXQt, not LXDE and the LXQt experience is still being refined.

  • If you need stability, Ubuntu 18.04 is an LTS version which will be supported for five years (till April 2023). Ubuntu 19.04 and Lubuntu 19.04 are supported only until January 2020. The source of the dates is here.


If you still want to go ahead with trying to remove software unique to Ubuntu, you can download the manifests for each system and compare them.

The Ubuntu 19.04 manifest is available here.

The Lubuntu 19.04 manifest is available here.

Once you've saved both manifests to a folder on your computer, open a terminal in that folder and run:

comm -13 lubuntu-19.04-desktop-amd64.manifest ubuntu-19.04-desktop-amd64.manifest

The order is important: first the Lubuntu manifest, then the Ubuntu manifest.

The output will be a list of files only present in the Ubuntu 19.04 manifest and absent from the Lubuntu 19.04 manifest. Read man comm for what comm does.

Caveat: Being listed in the manifest does not necessarily mean that the file is present on completion of the installation process. An example is ubiquity and related files. These files, along with some others, are automatically removed as part of a clean-up.


On further reflection, /var/log/installer/initial-status.gz is a better source of what was actually installed on your Ubuntu system.

If you copy that file to your home folder and unzip it using gunzip initial-status.gz, you can then run

grep -E "^Package:" initial-status | awk -F " " '{ print $2 }' | sort

to get a list of packages that were finally installed (after the cleanup that occurs during an installation). In that respect, it is preferable to relying on the manifest.

Once you've got the list, you can decide which applications from Ubuntu you want to keep or remove.


Edit:

I'm not sure that purging ubuntu-desktop would be an easier route. ubuntu-desktop is a metapackage. Removing a metapackage may not remove the packages specified by the corresponding metapackage.

I looked at this in a VM of Ubuntu 19.04 (minimal install upgraded from 18.10 minimal install).

dkb@dkb-UM:~$ apt purge -s ubuntu-desktop
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gnome-shell-extension-desktop-icons ubuntu-desktop-minimal
  xdg-desktop-portal xdg-desktop-portal-gtk yaru-theme-gtk yaru-theme-icon
  yaru-theme-sound
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  ubuntu-desktop*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Purg ubuntu-desktop [1.431]
dkb@dkb-UM:~$ apt purge -s ubuntu-desktop-minimal
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  ubuntu-desktop* ubuntu-desktop-minimal*
0 upgraded, 0 newly installed, 2 to remove and 6 not upgraded.
Purg ubuntu-desktop [1.431]
Purg ubuntu-desktop-minimal [1.431]
dkb@dkb-UM:~$ 
  • I like the approach. It clearly shows you want you are doing. A more blunt method might be to purge the desktop and use a terminal session to install lubuntu-desktop. All personal files will be kept intact or could be restored from a backup. – Rinzwind May 8 at 14:41
  • @Rinzwind, I had the impression that purging ubuntu-desktop may only remove the metapackage and not the files specified by the metapackage. – DK Bose May 8 at 14:48
  • @Rinzwind please see my edit. I ran a simulation of purging ubuntu-desktop and ubuntu-desktop-minimal. – DK Bose May 8 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.