Removing components that are no longer needed
To reduce the size of the attack surface, unneeded programs, services, and operating system components should be removed.
The deletion of system components should only be done by experienced users. Negative side effects may occur, and programs or services can no longer be run correctly.
Particularly with Beckhoff RT Linux® systems, changes should be reviewed and tested in advance, as even indirect dependencies can affect proper operation.
With apt list –installed 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. Alternatively, you can query the package database directly using dpkg -l. In addition to packages for the actual application, diagnostic, or administrative functions, the list also includes packages required by other programs.
If a package that is required by another installed package is removed, the package manager will indicate which other packages are affected or would need to be removed as well. This allows you to determine whether a package is still a dependency of other installed components. Packages that are known to no longer be needed can be removed using sudo apt remove <package name>.
If you also want to remove the associated configuration files, you can use sudo apt purge <package name> instead. After that, you can use sudo apt autoremove to automatically delete dependencies that were installed but are no longer needed. This ensures that no packages that are no longer needed remain on the system. In addition, any services that are not needed should be disabled, unless they are already removed by uninstalling the corresponding packages.