Cleanup

From Run Your Own
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