大网数据广告活动
服务器运维问答

delete systemd not-found services

· 52CE 我爱测

My server shows multiple missing services. How can i delete them from Systemd? They are not-found. systemctl -a shows: multiple not found systemctl reset-failed shows: still shows These (none of them are in /etc/systemd/ or /lib/…

问题原文

原帖链接 · Patrik Laszlo · CC BY-SA 3.0

My server shows multiple missing services. How can i delete them from Systemd? They are not-found.

systemctl -a shows: multiple not found
systemctl reset-failed shows: still shows

These (none of them are in /etc/systemd/ or /lib/systemd):

exim4.service - i use postfix, i never installed
apache2.service - i use nginx

Thanks!

已采纳解答

原帖链接 · zbyszek · CC BY-SA 3.0

systemd tries to load all services which are mentioned in Wants=, Requires=, After=, Before=, RequiresMountsFor=, Conflicts=, Requisite=, PartOf=, …, x-systemd.requires=, x-systemd.requires-mounts-for=, systemd.unit=, SYSTEMD_WANTS=, and also symlinked in .wants and .requires and probably some other places I forgot.

The units you're seeing must be mentioned somewhere. Systemd doesn't know anything about apache2 or exim4 by itself. Note that systemd will generate "wrapper" services for sysvinit scripts.

Having those services listed in systemctl --all output is harmless. There's no need to "delete" them.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-03-07)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。