[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: about systemd service leftovers



Patrice Duroux wrote:

> By the time on my Sid system, there is an accumulation of:
> 
> $ systemctl list-units --all | grep '●'

probably it is best to use
$ systemctl list-units --all --state=not-found

I try to understand where is the problem

For example
$ LANG=C dpkg -l podman
dpkg-query: no packages found matching podman

$ systemctl list-units --all podman.service
  UNIT           LOAD      ACTIVE   SUB  DESCRIPTION   
● podman.service not-found inactive dead podman.service
[...]

but there is not podman.service file anywhere
there is not a dependency in any systemd service

but:
$ systemd-analyze dump podman
-> Unit podman.service:
        Description: podman.service
        Instance: n/a
        Unit Load State: not-found
        Unit Active State: inactive
        State Change Timestamp: Sun 2024-04-07 11:41:49 CEST
        Inactive Exit Timestamp: n/a
        Active Enter Timestamp: n/a
        Active Exit Timestamp: n/a
        Inactive Enter Timestamp: n/a
        May GC: yes
        Need Daemon Reload: no
        Transient: no
        Perpetual: no
        Garbage Collection Mode: inactive
        Slice: n/a
        CGroup: n/a
        CGroup realized: no
        WantedBy: multi-user.target (destination-file)
        ReferencedBy: multi-user.target (destination-file)

so I found a dead symlink
$ ls -l /etc/systemd/system/multi-user.target.wants/podman.service
lrwxrwxrwx 1 root root 34  1 ago  2020 /etc/systemd/system/multi-user.target.wants/podman.service -> /lib/systemd/system/podman.service

$ LANG=C ls -l /lib/systemd/system/podman.service
ls: cannot access '/lib/systemd/system/podman.service': No such file or directory

It seem that removing podman package don't remove the symlink

Ciao
Davide

--
La mia privacy non è affar tuo
https://noyb.eu/it
- You do not have my permission to use this email to train an AI -
If you use this to train your AI than you accept to distribute under AGPL
license >= 3.0 all the model trained, all the source you have used to
training your model and all the source of the program that use that model


Reply to: