Shrink the systemd journal to a maximum size
shrink journal | delete old journalctl logs | disk full because of journal | journalctl vacuum | journalctl | disk-space | cleanupWarning, destructive. This command deletes, overwrites or changes data in a way that cannot easily be undone. Check every placeholder carefully and make a backup first.
journalctl --vacuum-size=500MRemoves archived journal files, starting with the oldest, until the used space is below the target value. The deleted logs are gone for good, so back them up first if you are in the middle of troubleshooting. Alternatively, --vacuum-time=2weeks removes everything older than two weeks.
Note: The currently active journal file is not touched. To keep the journal from growing again, also set SystemMaxUse permanently.
Also searched as
- shrink journal
- delete old journalctl logs
- disk full because of journal
- journalctl vacuum