-1

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.

aitor
  • 291

2 Answers2

1

As Doug said in the comments, with du -h --max-depth=1 I can delimiting the large directory.

aitor
  • 291
1

For a better and interactive overview you can use ncdu.

Start count from current dir: ncdu -x

Start count from custom dir: ncdu -x /some/dir

(-x parameter is for "Do not cross filesystem boundaries")

NotTheDr01ds
  • 17,888
k3dAR
  • 46