나는'm 는 데 문제가 알아내는 방법을 제거하 systemd 단위는 더 이상 파일이 있습니다. 그들은 여전히 보존하는 시스템에 어떻게 든.
이전 부러진 단위를 제거하십시오:
core@ip-172-16-32-83 ~ $ systemctl list-units --all firehose-router*
UNIT LOAD ACTIVE SUB DESCRIPTION
<E2><97><8F> [email protected] not-found failed failed [email protected]
<E2><97><8F> [email protected] not-found failed failed [email protected]
LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
2 loaded units listed.
To show all installed unit files use 'systemctl list-unit-files'.
파일이 존재하지 않는,아직 다시 로드하는 아직도 이러한 단위 느린:
core@ip-172-16-32-83 ~ $ systemctl list-unit-files [email protected]
core@ip-172-16-32-83 ~ $ sudo systemctl daemon-reload
core@ip-172-16-32-83 ~ $ systemctl list-units --all firehose-router*
UNIT LOAD ACTIVE SUB DESCRIPTION
<E2><97><8F> [email protected] not-found failed failed [email protected]
<E2><97><8F> [email protected] not-found failed failed [email protected]
LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
2 loaded units listed.
To show all installed unit files use 'systemctl list-unit-files'.
파일이 없 관련는 것을 그들에게 내가 찾을 수 있습니다:
core@ip-172-16-32-83 ~ $ sudo find /var/run/systemd -name "*firehose-router*"
core@ip-172-16-32-83 ~ $ find /etc/systemd/ -name "*firehose-router*"
core@ip-172-16-32-83 ~ $ find /usr/lib/systemd/ -name "*firehose-router*"
core@ip-172-16-32-83 ~ $
그래서 어떻게 제거하십니까?
때 systemd 분석 단위를 정의 파일,그것은 참고 다른 관련된 유닛이라는 파일에 여러 다른 단위를 존재하지 않습니다.
$ systemctl --state=not-found --all
> ( ...prints list of 'not-found' units )
$ grep -r "<missing-unit>" /usr/lib/systemd/system
> ( returns files with references to <missing-unit> )
면 유닛으로 보여줍"찾을 수 없음",it's 이 반드시 오류가 우리가 알고있는 모든입니다,지역 단위의 정의 주장을 어떤 관계가 있습니다. 이 관계를 중 하나가되지 않을 수 있습니다. 예를 들어,그것은 될 수 있는"기:"
다른 단위를,그러나 우리는't 를 사용하는 다른 단위입니다.
그것은 보인다 systemd 유지의 링크하지 않지만 알고 무엇을 할 때 당신이 그들과 함께 단위를 삭제한 파일입니다.
당신이 시도할 수 있습들을 수동으로 제거하는/etc/systemd/시스템/유지할 필요가 없습니다.대상입니다.고 싶어/
과 같지만 물론systemctl 리셋에 실패
에서 이전의 대답이 소리 같은 더 나은 옵션입니다.
$ cd /etc/systemd/system
$ sudo mv lock.service /tmp
$ sudo systemctl disable lock.service
Failed to disable unit: No such file or directory
$ sudo mv /tmp/lock.service .
$ sudo systemctl disable lock.service
Removed /etc/systemd/system/suspend.target.wants/lock.service.