Cleanup

From Run Your Own
Revision as of 07:32, 4 April 2024 by 320x200 (talk | contribs) (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 ===...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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