Deleting utilities that are part of the core system

Playing around with FreeBSD 15.0 and trying out different programs, I got curious how do I remove some of the utilities which I won't be using.

Like fdisk, for example, which is already getting deleted in FreeBSD 16.0 anyway.
% pkg which $(which fdisk) told me that fdisk belongs to the FreeBSD-runtime-15.0 package, which is basically the core system (and I do realize that touching the core is generally a bad practise). I know I can just leave fdisk in peace, but out of sheer interest I want to ask: how to completely remove a package from the system (which may belong to clusters like FreeBSD-runtime or FreeBSD-utilities)? Is # rm /sbin/fdisk the way to go? Does it involve messing with the sources, like patching and building from them?
 
Back
Top