Like there is a way to show all logs belonging to a unit: journalctl -xu <unit>
,
Is there a way to clear the logs belonging to a specified unit with journalctl
?
Actually, my problem is, one of the service which is imported (from Sys-V /etc/init.d
file automatically by systemd
) is logging and that is seen in both syslog
as well as journal
!
I want to remove the logs from the journal
as it eats up a lot of space! From the manuals,
there is no way to tell journald
to NOT persist certain logs! I don't want to forward all
logs to syslog
! So, I am thinking, if I could periodically remove the said unit's logs
from journal
, it will be a huge win!