Removing components that are no longer needed

To reduce the size of the attack surface, unneeded programs and operating system components should be removed.

The removal of system components should only be done by well-versed persons. Negative side effects may occur and programs can no longer be run correctly.

With pkg info you can view all packages installed on the system. On delivery, all packages listed here are relevant for the basic system or for Beckhoff software. In addition to packages for TwinCAT with the abbreviation TC, the Beckhoff IPC diagnostics and packages for the basic system that begin with "os-generic", dependencies, i.e. programs that are required by other programs, are also located here.

If you delete a package that is a dependency of another package, the system asks you whether you also want to delete the associated packages. This allows you to determine if a package is a dependency of a package that is still installed. Packages that you know are no longer needed can be deleted with doas pkg delete <pkg-name>. Afterwards, the command doas pkg autoremove can be used to delete all dependencies that are no longer needed. This ensures that no packages that are no longer needed remain on the system.