I've created a systemd job using systemd-run --on-calendar ....
Now I've replaced it with proper .timer
and .service
files, but I'm not able to remove the old one. I can stop it and disable it, but when I call systemctl list-timers
it still appears with its arbitrary name run-r0d0dc22...
. I also looked for its .timer
file, but I couldn't find them.
Removing a timer created with “systemd-run –on-calendar”
systemdsystemd-timer
Best Answer
The transient files end up in
/run/user/
and do not seem to ever be removed until the user logs out (forsystemd-run --user
) or until a reboot, when/run
is recreated.For example, if you create a command to run once only at a given time:
You will get files owned by you in
/run
:For non
--user
the files are in/run/systemd/system/
You can remove the files, do a
systemctl [--user] daemon-reload
and thenlist-timers
will show only the Unit name, with their last history if they have already run. This information is probably held within systemd's internal status or journal files.