OpenBSD is a simple UNIX operating system. It doesn’t bind everything in the default packages installed into the database as most GNU/Linux distribution packages had with package manager.

Due to version upgrades every six months, if one had to use sysupgrade command to upgrade, it would installed all the base package tarballs, including x* and games.

What if you don’t need these packages? It means you don’t want to use any tools that depend on these libs. If you’re someone new to OpenBSD, I suggest you should keep these packages unless there is a reason for you to do this.

Mind you from the OpenBSD FAQ:

Some libraries from xbaseXX.tgz, like freetype or fontconfig, can be used outside of X by programs that manipulate text or graphics. Such programs will usually need fonts, either from xfontXX.tgz or font packages. For the sake of simplicity, the developers decided against maintaining a minimal xbaseXX.tgz set that would allow most non-X ports to run.

You should keep xbaseXX.tgz because some programs need it to run correctly, even if it’s a non-X program. You can remove any unrelated and keep only what you need. If you don’t need it, it is easy to do this in OpenBSD, which may be done manually.

For each fileset, obtain a list of files from the ftp site and remove them:

$ doas su -
# cd /
# tar tzf /path/to/gameXX.tgz | xargs rm
# tar tzf /path/to/xbaseXX.tgz | xargs rm
# tar tzf /path/to/xfontXX.tgz | xargs rm
# tar tzf /path/to/xservXX.tgz | xargs rm
# tar tzf /path/to/xshareXX.tgz | xargs rm

Check for the emptied directories related to these packages and manually do rmdir to the directories.