Disabling unneeded services is a wise practice. As a result, fewer ports are available for exploitation in case of unwanted services running on the server of the nonessential service.
Install the systemd package:
sudo apt-get install systemd
See which non essential services are running:
Recognize which services may expose your system to potential risks. Each service has its own price.
Stop the service if it’s currently running:
systemctl stop <service>
Disable the service from starting on boot:
systemctl disable <service>
After running these commands, check the status of the non-essential services:
systemctl status <service>