How do I safely remove software from my system?

Use the swremove command. See swremove(1M).

[an error occurred while processing this directive]