After searching a bit, all I got is journalctl --vacuum-time...
. However, this command doesn't delete service logs. So, how can I safely delete logs of a specific service from linux?
1 Answer
Use logrotate
. You can edit configuration file and customize which log will be deleted and how frequently.
See man page for full options list: http://www.skrenta.com/rt/man/logrotate.8.html
-
Thanks for replying, it seems this command can only work with non binary logs. Is there any way to rotate journald binary logs?– WilliamCommented Jan 21, 2019 at 14:00