/etc/systemd/system/timers.target.wants symlink to pamac-mirrorlist.timer breaking other timers

I was trying to enable the paccache systemd timer so I can automatically clean out my cache (I use yay to update my packages), but I kept getting this error when trying to enable the timer with:

sudo systemctl enable paccache.timer

Failed to enable unit: File /etc/systemd/system/timers.target.wants/paccache.timer: Not a directory

Looking around, at the /etc/systemd/system/timers.target.wants directory, I saw that on my system it’s actually a symlink to /usr/lib/systemd/system/pamac-mirrorlist.timer. I suspect this is why I can’t enable paccache.timer.

My question is, how do I correctly fix this without breaking anything pamac related?

with pamac we have pamac-cleancache.timer for make this job

Welcome to Manjaro.

$ sudo rm /etc/systemd/system/timers.target.wants
$ sudo mkdir /etc/systemd/system/timers.target.wants
$ sudo ln -s /usr/lib/systemd/system/pamac-mirrorlist.timer /etc/systemd/system/timers.target.wants/

and (if still wanted):

$ systemctl enable paccache.timer
1 Like

right, but my understanding is this is for pamac, not for yay/pacman, correct?

it’s the pacman cache :wink: (so for yay,pacman,pamac)
in pacman.conf, we have: #CacheDir = /var/cache/pacman/pkg/

For the systemd link, it’s a bug:

1 Like

So I cannot enable pamac-cleancache.timer, either - should I delete the symlink?

as writed by @freggel.doe, unlink and recreate directory

pamac-cleancache not enabled ? for verif : systemctl list-timers --all

EDIT: no create symlink, only enable timer
was not a systemd bug but an error in pamac package

1 Like

they were not enabled. I enabled and started them after deleting the symlink and making timers.target.wants a directory. Do I have to create a pamac-mirrorlist symlink now? I don’t fully understand the systemd bug, sorry.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.