Skip to content

Find Large Files

Find Large Files#

Look at the top folders and files in current directory

du -hsx * | sort -rh | head -10

Go to /var, /opt and ~ to try the above

When your VM has run out of space

find / -xdev -type f -size +100M

Decrease Journal Size#

If you run this and see references to the journal


Systemd might be using a lot of space.

Check and decrease the size with:

sudo journalctl --disk-usage
sudo journalctl --vacuum-size=128M
sudo journalctl --verify

Decrease Git Repo Size#

From time to timea git repo may gather a lot of garbage

If you have an entry like this in the above:


You might want to go garbage collection:

cd /var/www/my_site
git gc