2

UBuntu 20.10 is running gnome-session on Xorg. I don't use wayland at all. But when trying to remove possible irrelevant components, I found following ones cannot be removed.

aptitude search '~i' -F '%p' | grep wayland

libwayland-client0
libwayland-cursor0
libwayland-egl1
libwayland-server0
xwayland

The last package xwayland is to be required by gnome-session, which makes no sense to me since xwayland should be useless in current desktop session.

The first three are claimed to be part of wayland compositor infrastructure, and required by some other core packages such as libgtk-3-0, which makes no sense either since wayland is (if not supposed to be) an alternative to Xorg and shouldn't be marked as prerequisite when x11 environment has been ready.

It is even worse for libwayland-server0 to be required by gnome-shell itself.

So the question follows: Is it really necessary for these packages to be remained and managed against current designated (reverse-)depedencies in X11 desktop environment? And how can I completely remove all these unwanted packages?

2 Answers 2

1

The package developpers decide what compounds are hard dependencies and what compounds are optional, and set that as such in their packages.

Ubuntu relies on Gnome Shell for its desktop environment. That is designed to run on Wayland, and can also run on Xorg.

Is it really necessary for these packages to be remained and managed against current designated (reverse-)depedencies in X11 desktop environment?

Technically speaking, very likely not. One could prepare .debpackages of Gnome Shell that would not indicate a hard dependency on Wayland. Ubuntu developers by default offer also a Wayland session of Gnome Shell.

In the end, there is probably little reason to bother. The only issue, if it is an issue, is that a few extra megabytes of disk space are used by the unused packages.

How to remove these unwanted packages? That is probably quite technical. As indicated before, that would at least require Gnome Shell .deb packages that do not mark these Wayland packages as hard dependencies. You still could delete files installed by these packages manually, but that would be on your own risks and cause a discrepancy between what is actually on your system, and what the APT package system thinks is on your system.

0

There are several possibilities for the dependency.

a) it's a library that the software you have installed requires from the way it has been written

in this case you need to change the software so that it doesn't need the library. You can do this by getting the source code for the software and proposing a patch for that.

b) it's a library that isn't needed by the software normally, but has been configured to be included when the software was built

in this case, you can change the build configuration - that's included in the Debian package that I will cover in the next option.

c) it's a library or other dependency that the software will work without but that was included in the deb dependencies even so.

In this case you should get the source dpkg and configuration for that and edit that. Propose changes.

For each of these steps there's lots to learn, probably best starting with how to package for Debian.

In case c) it might be that you can just delete the files and still have things work. You could move them to a different name and then try the software and see if it works normally. Occasionally, though, you might find that it crashes randomly later so I wouldn't recommend this unless you really need to save space.

Changing any of these things will be quite a big effort but on the other hand it's a journey towards learning how to make your own dpkg packages and so it's a worthwhile investment if you think you might do that in future.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .