Shrink the systemd Journal with journalctl --vacuum

Check how much space the binary journal consumes and permanently trim it by size, age, or file count.

LinuxlogsjournalctldiskMedium risk
Run `sudo journalctl --disk-usage` to see the size, then `sudo journalctl --vacuum-size=500M` to trim archived journals to 500 MB.

01Command

Command
$ sudo journalctl --disk-usage && sudo journalctl --vacuum-size=500M

02What it does

Alternatives are `--vacuum-time=30d` (keep 30 days) and `--vacuum-files=10` (keep 10 archived files); vacuuming only removes archived journals, never the currently active one. For a permanent cap, set SystemMaxUse=500M in /etc/systemd/journald.conf and restart journald, otherwise it will simply grow again. Vacuuming is safe for journald operation but the deleted logs are gone for good.

03Risk

RiskMedium risk
Requirementssystemd-journald
!Warning: Vacuumed log entries are permanently deleted — export anything you need first with `journalctl > file.log`.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • journalctl(1) - Linux manual page
    Ubuntu Manpages · technical · 2026-09-17
    Evidence: --disk-usage shows the total disk space journals occupy; --vacuum-size, --vacuum-time and --vacuum-files reduce journal size below the given threshold.

Last verified: 2026-09-17 · Category: System & Settings

06Related solutions