Sunday, 18 August 2019

Cleanup journalctl logs

Hi all,

Been a while since my last writing. If you are provisioning small server and notice that you are running out of space, the easiest thing to clean up are the journal logs. You can clear it based on time or size.

Anyway below are the commands:

# journalctl --vacuum-time=7d

This command will clean up 7 the logs until the last 7 days

# journalctl --vacuum-size=100M

This will keep only the last 100M of journalctl logs.

See you next time