Cleanup: Difference between revisions

From Run Your Own
Jump to navigation Jump to search
(Created page with "Sometimes you need to cleanup. Because there is too much shit on your disks. === general cruft === <code>ncdu</code> is your friend. <code>dust</code> too. === log files ===...")
 
(No difference)

Latest revision as of 05:32, 4 April 2024

Sometimes you need to cleanup. Because there is too much shit on your disks.

general cruft

ncdu is your friend. dust too.

log files

/var/log

Easy. just rm compressed archives and the first .1 rotated files. If you are really in emergency mode you can also delete the live log files, they will be recreated, don't worry.

systemd managed logs

For these it's better to use the dedicated tool:

journalctl --disk-usage        # what's the damage
journalctl --vacuum-size=200M  # delete old logs so that current logs only take 10MB disk usage