website/content/blog/clearingsystemdlogs.md

23 lines
532 B
Markdown
Raw Normal View History

2021-02-21 16:11:46 -05:00
---
2023-03-10 12:41:04 -05:00
date: 2021-02-21 21:08:51
2021-02-21 16:11:46 -05:00
draft: false
2023-01-05 14:04:45 -05:00
medium_enabled: true
2023-03-10 12:41:04 -05:00
medium_post_id: acf4ee0e7f0c
tags:
- Linux
title: Clearing Systemd Logs
2021-02-21 16:11:46 -05:00
---
Short post today. I wanted to clear out some disk space usage on one of my servers and noticed that the systemd logs were taking up a decent bit. Here are two options to clear out old logs.
Here is an example to do it by time, let's say 15 days:
```bash
journalctl --vacuum-time=15d
```
An example to clear it by total disk usage, let's say 10Gb:
```bash
journalctl --vacuum-size=10G
2023-03-10 12:41:04 -05:00
```