Regularly auditing installed software and services is vital. This process helps ensure that only essential components are maintained and updated with the latest security patches. For example, verify whether Apache is genuinely needed on Kubernetes cluster nodes or if it was installed inadvertently.

Managing Services with systemd
Modern Linux distributions commonly use systemd to manage services. Thesystemctl utility provides comprehensive control to view service status, start, and stop essential services.
For instance, to check the status of the Apache service, run:
/lib/systemd/system/apache2.service. While many packages install their service files automatically, some services might be manually added to launch additional processes. It is crucial to identify and manage only the services required for your environment.
Listing All Installed Services
To view all services installed on your system, use:Disabling Unnecessary Services
If you determine that a service file is not needed, you can disable and stop it. For example, to disable Apache:apt:
Before purging any package, ensure that it is not required by other services or dependencies. Removing essential software may disrupt system functionality.