第一步:停止服务
shell
sudo systemctl stop <服务名>第二步:禁用服务
shell
sudo systemctl disable <服务名>第三步:删除服务单元文件
shell
sudo rm /etc/systemd/system/<服务名>.service
sudo rm /lib/systemd/system/<服务名>.service第四步:重载 systemctl 配置
shell
sudo systemctl daemon-reload第五步:验证移除结果
shell
systemctl list-units --type=service | grep <服务名>