Monday, December 2, 2019

Clean up logs, cache, docs, man files from Proxmox pve-root to free up disk space

My main pve-root partition was getting full (I only reserved 4GB, I should have reserved more space here, at least 8GB). I searched and found many areas where I can remove files to gain back a few megabytes.

DELETING UN-NEEDED FILES IN /usr/share/doc

cd /usr/share/doc
rm -rf *


DELETING UN-NEEDED FILES IN /usr/share/man

cd /usr/share/man
rm -rf *


CLEAN UP JOURNAL LOGS FROM /run/log/journal

journalctl --disk-usage
nano /etc/systemd/journald.conf
     add or edit this line:  SystemMaxUse=50M
Signal or restart systemd-journald service:
     systemctl kill --kill-who=main --signal=SIGUSR2 systemd-journald.service
       -or-
     systemctl restart systemd-journald.service


CLEAN UP /var/cache/apt

apt clean
apt purge
apt autoclean

SUMMARY

The commands above freed up about 650MB of space in my Proxmox PVE 5.1
I hope this article has been useful for you.