I have an OpenSUSE Leap that functions as a build server.
As there is no need for X, KDE, GNOME or any other GUI, I have removed those packages.
Removed all packages related to KDE and Gnome, but I did not touch the Xorg packages.
Not really I assume. There is no way you tell apart one binary executable from another if it wants to open a window or not until you started it (or of course read it in it’s documentation).
I would have removed the patterns for those desktops (and not bluntly all packages that by incident start with a string that might indicate or not that it belongs to the group you want to de-install. Same of course for the pattern X Window System.
OTOH, I do not understand quite what you want. Not enough disk space in your root partition? Else leave all those packages just as they are. Simply set your default target to “Multi user System” and you are done.
If you really want to get rid of all X/Desktop packages, you better re-install as a Text Only system from the beginning (but even then I am not sure that there will be no GUI applications installed, maybe some, like YaST, can run CLI and GUI).
Try opening YaST2-Software, then the “Package Groups” tab, if I understand correctly you want to uninstall all the packages in the categories from “Education” to “Publishing” with the possible exception of “Programming”?
Yes, I looked and saw there is not a pattern for KDE.
And yes, removing the pattern will only avoid that on the first update or install, YaST/zypper will install anew all the packages listed in the pattern.
In any case, just removing packages with names xyx* might remove a package that by incident starts with zyz, but has nothing to do with a other packages that by incident use this as a brand name. Changes are small, but not nil.
OTOH, many KDE programs do not have names that start with kde, like kmail, kaddressbook, dolphin, etc., etc. I assume same is true for Gnome, etc.
I really wonder. You take a system that you have filled with software of several DEs. I assume for a reason. As I see it, now you want to use that system for a different purpose, that requires a complete different set of software. Why not install your system in a way that it fits it’s goal? All the finding out and try and error (mind the last word!) you are doing now will probably take much more time with a doubtful result.
I have 20G for root (ext4) in my Leap 15.1 of which only 12G is in use. Running KDE (no extra DEs installed).
I am not sure what you try to communicate with that. I understand that you want to build software, but what the word “server” implies here is unclear to me.
3400G:~ # zypper search --type pattern --installed-only
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
---+---------------+---------------------------------------+--------
i | apparmor | AppArmor | pattern
i+ | base | Minimal Base System | pattern
i+ | enhanced_base | Enhanced Base System | pattern
i | fonts | Fonts | pattern
i | games | Games | pattern
i+ | kde | KDE Applications and Plasma 5 Desktop | pattern
i | kde_pim | KDE PIM Suite | pattern
i | kde_plasma | KDE Plasma 5 Desktop Base | pattern
i+ | lamp_server | Web and LAMP Server | pattern
i | minimal_base | Minimal Appliance Base | pattern
i | multimedia | Multimedia | pattern
i | office | Office Software | pattern
i | sw_management | Software Management | pattern
i+ | x11 | X Window System | pattern
i+ | yast2_basis | YaST System Administration | pattern
3400G:~ #
Remove what you don’t need:
3400G:~ # zypper remove --clean-deps --type pattern kde
Reading installed packages...
Resolving package dependencies...
The following 77 packages are going to be REMOVED:
AppStream AppStream-lang appstream-glib appstream-glib-lang ark ark-lang discover discover-backend-flatpak discover-backend-fwupd discover-backend-packagekit discover-lang
flatpak fwupd fwupd-lang gcab gcab-lang gnome-desktop-lang gwenview5 gwenview5-lang kate kate-lang kate-plugins kcalc kcalc-lang kipi-plugins kipi-plugins-lang konsole
libKF5JSApi5 libKF5Kipi32_0_0 libKF5MediaWiki5 libappstream-glib8 libcfitsio9 libchm0 libdjvulibre21 libflatpak0 libfwupd2 libfwupdplugin1 libgcab-1_0-0 libgnome-desktop-3-19
libgnome-desktop-3_0-common libgusb2 libimagequant0 libjcat1 libkerfuffle20 libkipi-data libostree libostree-1-1 libsmbios-lang libsmbios_c2 libtss2-esys0 libtss2-sys0
libxmlb1 libzypp-plugin-appdata mobipocket okular okular-lang p7zip p7zip-full patterns-kde-kde pngquant python3-cmdln python3-createrepo_c shim skanlite skanlite-lang
spectacle spectacle-lang system-user-flatpak typelib-1_0-Flatpak-1_0 typelib-1_0-Fwupd-2_0 typelib-1_0-Soup-2_4 xdg-desktop-portal xdg-desktop-portal-gtk
xdg-desktop-portal-gtk-lang xdg-desktop-portal-kde xdg-desktop-portal-kde-lang xdg-desktop-portal-lang
The following pattern is going to be REMOVED:
kde
77 packages to remove.
After the operation, 122.1 MiB will be freed.
Continue? [y/n/v/...? shows all options] (y): n
3400G:~ #