How to Clear journalctl Logs

Clear the logs by time

Keep only the logs from the last 2 days:

journalctl --vacuum-time=2d

Clear the logs by size

Keep only the logs under 100mb:

journalctl --vacuum-size=100M

Subscribe to My Newsletter

The latest programming-related news, articles and resources - sent to your inbox monthly. Unsubscribe anytime.