You are not logged in.

#1 2018-11-20 18:21:15

Abbott
Member
Registered: 2017-10-07
Posts: 18

Removing links to old systemd units

I have found that there are some stale links to services that seem to no longer exist on my machine. I found this thread where someone had the same problem and they just deleted all of the links by hand. Is there any reason I should not delete any of these links, or is the fact that these services are not found a problem? Just wanted to double check before I did something like this.

abbott@arch% sudo systemctl list-units --state=not-found --all
  UNIT                       LOAD      ACTIVE   SUB  DESCRIPTION               
● auditd.service             not-found inactive dead auditd.service            
● display-manager.service    not-found inactive dead display-manager.service   
● firewalld.service          not-found inactive dead firewalld.service         
● ipset.service              not-found inactive dead ipset.service             
● lvm2-activation.service    not-found inactive dead lvm2-activation.service   
● plymouth-quit-wait.service not-found inactive dead plymouth-quit-wait.service
● plymouth-start.service     not-found inactive dead plymouth-start.service    
● syslog.service             not-found inactive dead syslog.service            
● syslog.target              not-found inactive dead syslog.target             

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.

9 loaded units listed.
To show all installed unit files use 'systemctl list-unit-files'.
abbott@arch% 

Thanks.

Offline

#2 2018-11-20 18:51:17

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,405
Website

Re: Removing links to old systemd units

syslog.target being not found is interesting, because that is owned by systemd itself. Likewise auditd.service is part of audit, and a dependency of systemd. Check the integrity of your systemd and audit packages.

pacman -Qkk systemd audit

But in general, not found units are not a problem, they are just referenced by other units. You can just ignore them.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2018-11-20 22:15:31

Abbott
Member
Registered: 2017-10-07
Posts: 18

Re: Removing links to old systemd units

abbott@arch% sudo pacman -Qkk systemd audit
backup file: systemd: /etc/systemd/timesyncd.conf (Modification time mismatch)
backup file: systemd: /etc/systemd/timesyncd.conf (Size mismatch)
systemd: 1504 total files, 0 altered files
error: package 'audit' was not found
abbott@arch% 

How could this be? I haven't seen any noticeable problems with systemd that I know of.

Last edited by Abbott (2018-11-20 22:15:48)

Offline

#4 2018-11-20 22:38:38

progandy
Member
Registered: 2012-05-17
Posts: 5,307

Re: Removing links to old systemd units

Your -Qkk output looks perfectly fine, [edit: except for the missing audit. ]

You can find broken symlinks for systemd units with this command. 

find /{usr/lib,run,etc}/systemd/{system,user} -xtype l -exec file '{}' \;

As WorMzy said, the not-found errors are mostly created by non-existing units mentioned in Before/After clauses.

Last edited by progandy (2018-11-20 22:53:11)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#5 2018-11-20 22:48:01

loqs
Member
Registered: 2014-03-06
Posts: 18,859

Re: Removing links to old systemd units

@progandy apart from the missing audit package.  systemd has required audit since 239.2-1 https://git.archlinux.org/svntogit/pack … fb24482448

Offline

#6 2018-11-20 22:49:25

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,405
Website

Re: Removing links to old systemd units

Whoops, syslog.target was my bad, I got it confused with syslog.socket (which is provided by systemd). You missing audit on the other hand is odd.

Please post the output of

pacman -Qi systemd linux

Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#7 2018-11-20 22:52:35

progandy
Member
Registered: 2012-05-17
Posts: 5,307

Re: Removing links to old systemd units

loqs wrote:

@progandy apart from the missing audit package.  systemd has required audit since 239.2-1 https://git.archlinux.org/svntogit/pack … fb24482448

Right, I missed that line.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#8 2018-11-21 18:21:18

Abbott
Member
Registered: 2017-10-07
Posts: 18

Re: Removing links to old systemd units

WorMzy wrote:

Please post the output of

pacman -Qi systemd linux
abbott@arch% sudo pacman -Qi systemd linux
Name            : systemd
Version         : 239.0-2
Description     : system and service manager
Architecture    : x86_64
URL             : https://www.github.com/systemd/systemd
Licenses        : GPL2  LGPL2.1
Groups          : base-devel
Provides        : nss-myhostname  systemd-tools=239.0  udev=239.0
Depends On      : acl  bash  cryptsetup  dbus  iptables  kbd  kmod  hwids  libcap  libgcrypt  libsystemd  libidn  lz4  pam  libelf  libseccomp  util-linux  xz  pcre2
Optional Deps   : libmicrohttpd: remote journald capabilities
                  quota-tools: kernel-level quota management
                  systemd-sysvcompat: symlink package to provide sysvinit binaries [installed]
                  polkit: allow administration as unprivileged user
Required By     : dhcpcd  libpulse  mkinitcpio  netctl  php-fpm  plex-media-server  systemd-sysvcompat
Optional For    : uwsgi  uwsgi-plugin-python  uwsgi-plugin-python2
Conflicts With  : nss-myhostname  systemd-tools  udev
Replaces        : nss-myhostname  systemd-tools  udev
Installed Size  : 18.96 MiB
Packager        : Christian Hesse <arch@eworm.de>
Build Date      : Fri 22 Jun 2018 11:04:34 AM EDT
Install Date    : Mon 27 Aug 2018 06:23:07 PM EDT
Install Reason  : Explicitly installed
Install Script  : Yes
Validated By    : Signature

Name            : linux
Version         : 4.18.5.arch1-1
Description     : The Linux kernel and modules
Architecture    : x86_64
URL             : https://git.archlinux.org/linux.git/log/?h=v4.18.5-arch1
Licenses        : GPL2
Groups          : base
Provides        : None
Depends On      : coreutils  linux-firmware  kmod  mkinitcpio
Optional Deps   : crda: to set the correct wireless channels of your country
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 66.90 MiB
Packager        : Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
Build Date      : Fri 24 Aug 2018 08:47:33 AM EDT
Install Date    : Mon 27 Aug 2018 06:23:53 PM EDT
Install Reason  : Explicitly installed
Install Script  : Yes
Validated By    : Signature

abbott@arch% 

Offline

#9 2018-11-21 18:22:28

loqs
Member
Registered: 2014-03-06
Posts: 18,859

Re: Removing links to old systemd units

When was the last time you performed a system update on that installation?

Offline

Board footer

Powered by FluxBB