This 1 Command Freed 2.6GB on My Linux Server @itsfoss
This 1 Command Freed 2.6GB on My Linux Server  @itsfoss
Uploaded February 2026 | Updated September 2026, 1 day ago
Learn how to clean systemd journal logs & free disk space on Linux

Systemd journal logs are useful for troubleshooting. But over time, they can quietly consume gigabytes of disk space especially on servers.

In this video, I show you how to:

• Check journal log disk usage
• Delete old logs safely
• Limit logs by size
• Restrict the number of log files
• Make log limits permanent
• Prevent your server from running out of space

This works on Ubuntu, Debian, Fedora, Arch, and most modern Linux distributions using systemd.

📌 1️⃣ Check Current Journal Disk Usage

journalctl --disk-usage

This shows how much space systemd journal logs are currently using.

📌 2️⃣ Delete Logs Older Than X Days

To remove logs older than 14 days:

sudo journalctl --vacuum-time=14d

You can change 14d to:

7d (7 days)
30d (30 days)
2m (2 months)

This removes archived logs older than the specified time.

📌 3️⃣ Limit Journal Logs by Total Size

Limit total size to 500MB (example):

sudo journalctl --vacuum-size=500M

This deletes older logs until total journal usage is below 500MB.

📌 4️⃣ Make Log Limits Permanent (Recommended for Servers)

Temporary cleanup is not enough. Logs will grow again.

Edit the journald configuration file:

sudo nano /etc/systemd/journald.conf

If it's not here, check /usr/lib/systemd directory.

Before editing, create a backup:

sudo cp /etc/systemd/journald.conf /etc/systemd/journald.conf.bak

Now find and modify (or uncomment) these parameters:

SystemMaxUse=500M
SystemMaxFileSize=72M
SystemMaxFiles=10

What these do:

SystemMaxUse → Maximum total disk space journal logs can use
SystemMaxFileSize → Maximum size per log file
SystemMaxFiles → Maximum number of log files retained

Adjust these values based on your server storage.

📌 5️⃣ Restart journald

After saving the file:

sudo systemctl restart systemd-journald

Now your system automatically enforces log limits.

No more manual cleanup.

Enjoy more disk space on your Linux system :)
This 1 Command Freed 2.6GB on My Linux ServerIf You Love Your Raspberry Pi, You’ll Love This Case TooMy right shift key has seen some rough days. What about yours?How to Limit Battery Charging to 80% in Ubuntu LinuxWhy NASA uses Linux 😜  movie source : space force s2Install and Use Steam to Play Games on Ubuntu #howtoubuntuHeres a neat tip for you to save all the installed packages in your Debian/Ubuntu System.This is peak open source software
Its FOSS - Linux Portal |

This 1 Command Freed 2.6GB on My Linux Server

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER