↑ ↓ select, Enter open, Esc close

Shrink the systemd journal to a maximum size

Adjust the values, the command updates live
root@server
journalctl --vacuum-size=500M

Removes 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

Related one-liners

All in systemd

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.