How to remove kdegames ?

No, the x11/kde5 meta-port includes games/kdegames. Removing kdegames will also remove kde5, and a pkg-autoremove(8) will then remove everything else.
It is possible to remove a required dependency without removing the parent package by using the pkg-delete(8) -f (--force) argument.

pkg-autoremove(8) shouldn't attempt to remove the parent package and dependencies.

Example:
Rich (BB code):
 # pkg info -d xfce4
xfce-4.18_1:
        xfce4-terminal-1.1.3
        xfce4-wm-4.18.0_3
        xfce4-session-4.18.4
        xfce4-panel-4.18.6
        xfce4-desktop-4.18.1_4
        xfce-icons-elementary-0.20
        greybird-theme-3.23.3
        xfce4-settings-4.18.6
        xfce4-power-manager-4.18.4
        xfce4-appfinder-4.18.1_2
        mousepad-0.6.3
        xfce4-notifyd-0.9.6
              

# pkg del xfce4-appfinder
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 2 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        xfce: 4.18_1
        xfce4-appfinder: 4.18.1_2

Number of packages to be removed: 2

Proceed with deinstalling packages? [y/N]: N


 # pkg del -f xfce4-appfinder
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        xfce4-appfinder: 4.18.1_2

Number of packages to be removed: 1

Proceed with deinstalling packages? [y/N]: y
1/1] Deinstalling xfce4-appfinder-4.18.1_2...
[1/1] Deleting files for xfce4-appfinder-4.18.1_2:
...


 # pkg autoremove
Checking integrity... done (0 conflicting)
Nothing to do.
 
It is possible to remove a required dependency without removing the parent package by using the pkg-delete(8) -f (--force) argument.
Which will then be reinstalled on the next pkg-upgrade(8) because it's a dependency of kde. While this certainly works it'll be temporarily. Also a pkg-check(8) is going to complain about missing dependencies.

Really, the best option is to install the "clean" KDE desktop (x11/plasma5-plasma) and then only the individual meta-ports from x11/kde5 you do want. That will keep everything neatly organized and correct. The x11/kde5 is just a convenient meta-port that installs everything but the kitchen sink. If you don't want everything you should simply install the individual components instead.
 
Thanks to SirDice for reminding me about x11/plasma5-plasma.
Looking at /usr/ports/x11/kde5/Makefile does it mean this kde5 metapackage includes all the following smaller packages ?

Code:
OPTIONS_DEFINE=    KDEADMIN KDEEDU \
        KDEGAMES KDEGRAPHICS KDEMULTIMEDIA KDENETWORK \
        KDEPIM KDEUTILS \
        PULSEAUDIO

So rather than pkg install kde5 could I install each of these separate packages, without KDEGAMES ?
For personal use, I'm making some customisations to the nice installation script discussed at https://forums.freebsd.org/threads/desktop-environments-installation-script.93020/#post-685212
 
So rather than pkg install kde5 could I install each of these separate packages, without KDEGAMES ?
Yes, correct. They're all meta-ports of themselves too, it then depends on the actual applications, so you could also install only the individual applications you want. None of these meta-ports contain anything of themselves, they all simply depend on other packages, so you don't need to use those meta-ports.

The sysutils/kdeadmin meta-port for example includes sysutils/kcron and sysutils/ksystemlog. You don't need to install kdeadmin, you can install kcron and ksystemlog individually.
 
Back
Top