Why Are Logs Filling Up My Disk on Linux
If Linux logs keep filling your disk, Kudu can help clean old log files and reclaim storage.
By Kudu Team
Kudu for Linux
See what Kudu cleans on Linux
Kudu lists supported package, app, and browser caches for review before cleaning, and manages XDG autostart entries. A headless agent is available for servers.
Download Kudu Free →How Kudu for Linux worksWhat Causes This?
Linux systems write logs constantly to track errors, services, updates, and security events. If log rotation is misconfigured, disabled, or not keeping up, old logs can pile up and consume large amounts of disk space. This is especially common on servers, dual-boot systems, WSL setups, or Linux virtual machines running noisy apps that generate repeated errors.
Common Symptoms
- Disk space keeps shrinking even though you are not saving many files
- You see very large files in
/var/log - Apps, updates, or services start failing because the disk is full
- The system becomes slow or shows “No space left on device” errors
- Log files with names like
.log,.gz, or numbered archives keep growing
How to Fix It Manually
-
Check whether logs are actually the problem.
- On a Linux system, open Terminal.
- Run:
sudo du -sh /var/log sudo du -ah /var/log | sort -rh | head -20 - This shows the total size of the log folder and the biggest files inside it.
-
Clear old rotated logs you no longer need.
- Many systems keep compressed archives such as
.gzfiles in/var/log. - To remove old compressed logs:
sudo find /var/log -type f -name "*.gz" -delete - To remove old numbered logs:
sudo find /var/log -type f -regex ".*\.[0-9]+$" -delete - Be careful not to delete active log files that services are currently writing to.
- Many systems keep compressed archives such as
-
Vacuum systemd journal logs.
- If your system uses
journald, the journal can grow very large. - Check current journal usage:
journalctl --disk-usage - Shrink it to a safer size:
sudo journalctl --vacuum-size=200M - Or remove entries older than a set time:
sudo journalctl --vacuum-time=7d
- If your system uses
-
Truncate oversized active logs instead of deleting them.
- If a service is actively using a huge log file, truncating it is safer than removing it.
- Example:
sudo truncate -s 0 /var/log/syslog sudo truncate -s 0 /var/log/kern.log - Replace the file path with the actual large log you found in step 1.
-
Force log rotation and verify the settings.
- Run:
sudo logrotate -f /etc/logrotate.conf - Then inspect common rotation rules:
cat /etc/logrotate.conf ls /etc/logrotate.d - Look for logs that are missing rotation rules or being kept for too long.
- Run:
-
Find and fix the app or service creating excessive logs.
- Check the largest logs for repeated errors:
sudo tail -100 /var/log/syslog sudo tail -100 /path/to/app.log - If one service is spamming errors, restart it and investigate the underlying issue:
sudo systemctl restart service-name - If you only clear logs without fixing the source, the disk will fill up again.
- Check the largest logs for repeated errors:
Fix It Automatically with Kudu
Kudu can scan your system for oversized log files, old rotated logs, and other storage waste without making you hunt through folders manually. It helps you safely remove unnecessary files and reclaim disk space faster, especially if the problem keeps coming back.

Kudu for Linux
See what Kudu cleans on Linux
Kudu lists supported package, app, and browser caches for review before cleaning, and manages XDG autostart entries. A headless agent is available for servers.
Download Kudu Free →How Kudu for Linux worksRelated guides
How to Clean Up Large Journal Logs on Linux
If journal logs are taking too much space, Kudu can help clean them safely and reclaim disk storage.
How to Fix Low Disk Space on Linux
Running low on Linux disk space? Kudu can remove caches, logs, and temporary files to free storage.
How to Remove App Cache on Linux
Apps keep reusable data to avoid downloading or rebuilding it.
How to Fix Apps Opening Slowly on Linux
If Linux apps take too long to open, Kudu can help clean caches and reduce system clutter.