m1gin 63

On the VPS the disk became full and some web applications started to give 503 errors.

In order to free up some disk space I did some researches and I took some notes about what I did.

Check disk space:

df -h

Check the size of a specific folder:

du -h -d 1 /var/cache/apt/

Do some cleaning:

  • sudo apt autoremove
  • sudo apt autoclean
  • sudo apt clean

Log files:

journalctl --disk-usage

To delete logs older than 7 days

sudo journalctl --vacuum-time=7d

Add to: