I don't have much experience in system administration. I have installed a Mastodon instance on a VPS running Ubuntu 20.04. After ten days the server has been completely filled, which seems very rare to me. How can 38Gb be filled?
If I do a df -h
, I get this:
Filesystem Size Used Avail Use% Mounted on
udev 949M 0 949M 0% /dev
tmpfs 194M 860K 193M 1% /run
/dev/sda1 38G 36G 0 100% /
tmpfs 968M 28K 968M 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 968M 0 968M 0% /sys/fs/cgroup
/dev/sda15 253M 138K 252M 1% /boot/efi
tmpfs 194M 0 194M 0% /run/user/0
As can be seen, the file system mounted on /dev/sda1 is completely full.
There must be something that takes up a lot of space, how can I find it? How can I find a directory that takes up a lot of space?
du -h
doesn't work for me because it starts printing thousands of lines and doesn't stop.
I would appreciate any hint or help.
[EDIT] I don't want to delete the question even though it's been tagged as a duplicate because the linked question doesn't have the du -h --max-depth=1
command among its answers, which for me has been crucial.
du -h --max-depth=1
and proceed with the investigation based on the results. Perhaps some log files are becoming large in/var/log
. – Doug Smythies Jan 02 '23 at 18:56