0

When I run df -h, I get this:

du -shx /* | sort -rh

The /dev/vda1 directory has 24G used. I'm trying to figure out which files take up the space. I tried du -shx /* | sort -rh and got this:

)

It lists /usr as the biggest with 2.8G inside. However it's 24G that are used, not 2.8G.

Using ncdu from inside /dev didn't help either:

enter image description here

What can I do to determine what takes up the 24G?

EDIT:

/# sudo ls -l /
total 108
drwxr-xr-x   2 root root  4096 Nov  7 06:24 bin
drwxr-xr-x   4 root root  4096 Nov 14 06:43 boot
drwxr-xr-x  10 root root  4096 Nov 14 01:23 Bots
drwxr-xr-x  16 root root  3580 Nov 15 00:10 dev
drwxr-xr-x 125 root root  4096 Dec  6 22:15 etc
drwxr-xr-x   3 root root  4096 Jun 28 16:30 home
lrwxrwxrwx   1 root root    33 Nov 14 06:43 initrd.img -> boot/initrd.img-4.4.0-169-generic
lrwxrwxrwx   1 root root    33 Nov 14 06:43 initrd.img.old -> boot/initrd.img-4.4.0-168-generic
drwxr-xr-x  21 root root  4096 Jun 28 15:09 lib
drwxr-xr-x   2 root root  4096 Nov 14 18:31 lib64
drwx------   2 root root 16384 Oct  4  2018 lost+found
drwxr-xr-x   2 root root  4096 Oct  4  2018 media
drwxr-xr-x   2 root root  4096 Oct  4  2018 mnt
drwxr-xr-x   4 root root  4096 Sep 24 18:55 opt
dr-xr-xr-x 126 root root     0 Nov 15 00:10 proc
drwx------  25 root root  4096 Dec  6 20:39 root
drwxr-xr-x  26 root root   940 Dec  6 22:25 run
drwxr-xr-x   2 root root 12288 Oct  1 06:34 sbin
drwxr-xr-x   2 root root  4096 Oct 20  2018 snap
drwxrwxrwx   2 root root  4096 Nov 14 18:28 sources
drwxr-xr-x   2 root root  4096 Oct  4  2018 srv
drwxr-xr-x   3 root root  4096 Nov 14 17:45 stuff
dr-xr-xr-x  13 root root     0 Dec  6 22:30 sys
drwxrwxrwt  10 root root 12288 Dec  6 22:35 tmp
drwxr-xr-x  10 root root  4096 Oct  4  2018 usr
drwxr-xr-x  13 root root  4096 Oct  4  2018 var
lrwxrwxrwx   1 root root    30 Nov 14 06:43 vmlinuz -> boot/vmlinuz-4.4.0-169-generic
lrwxrwxrwx   1 root root    30 Nov 14 06:43 vmlinuz.old -> boot/vmlinuz-4.4.0-168-generic

EDIT: ncdu / gives this output:

--- / ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    2.4 GiB [##########] /usr
  888.3 MiB [###       ] /var
  847.5 MiB [###       ] /stuff
  823.6 MiB [###       ] /root
  548.1 MiB [##        ] /lib
  293.5 MiB [#         ] /Bots
  267.4 MiB [#         ] /opt
  246.4 MiB [#         ] /boot
   15.6 MiB [          ] /bin
   13.3 MiB [          ] /sbin
   10.6 MiB [          ] /run
    8.0 MiB [          ] /etc
  180.0 KiB [          ] /tmp
   20.0 KiB [          ] /home
e  16.0 KiB [          ] /lost+found
    8.0 KiB [          ] /snap
    4.0 KiB [          ] /dev
    4.0 KiB [          ] /lib64
e   4.0 KiB [          ] /srv
e   4.0 KiB [          ] /sources
e   4.0 KiB [          ] /mnt
e   4.0 KiB [          ] /media
.   0.0   B [          ] /proc
    0.0   B [          ] /sys
@   0.0   B [          ]  initrd.img.old
@   0.0   B [          ]  initrd.img
@   0.0   B [          ]  vmlinuz.old
@   0.0   B [          ]  vmlinuz


 Total disk usage:   6.2 GiB  Apparent size:   6.2 GiB  Items: 404555

EDIT:

# du -hsc .[!.]* *
du: cannot access '.[!.]*': No such file or directory
16M     bin
247M    boot
294M    Bots
4.0K    dev
8.1M    etc
20K     home
0       initrd.img
0       initrd.img.old
549M    lib
4.0K    lib64
16K     lost+found
4.0K    media
4.0K    mnt
268M    opt
du: cannot access 'proc/25571/task/25571/fd/4': No such file or directory
du: cannot access 'proc/25571/task/25571/fdinfo/4': No such file or directory
du: cannot access 'proc/25571/fd/4': No such file or directory
du: cannot access 'proc/25571/fdinfo/4': No such file or directory
0       proc
824M    root
11M     run
14M     sbin
8.0K    snap
4.0K    sources
4.0K    srv
848M    stuff
0       sys
180K    tmp
2.4G    usr
889M    var
0       vmlinuz
0       vmlinuz.old
6.3G    total

EDIT:

lsblk
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
vda     253:0    0   25G  0 disk
├─vda1  253:1    0 24.9G  0 part /
├─vda14 253:14   0    4M  0 part
└─vda15 253:15   0  106M  0 part /boot/efi
  • Probably in the root folder. Do sudo ls -l / and see if there is anything unusual. Having loads of Java error logs lying around doesn't help either, of course. – Jos Dec 6 '19 at 22:06
  • @Jos Could you please see my edit? I tried to run the command, but there doesn't seem to be anything suspicious. – parsecer Dec 6 '19 at 22:38
  • Can you run ncdu / and post the results? Are you running any software that creates snapshots, like Timeshift? Also, please do not post pictures of text; it's much easier to read if you post everything like your sudo ls -l / output. – ajgringo619 Dec 6 '19 at 22:49
  • @ajgringo619 Please, see edit! It says that total used is 6.2G, while it should be around 24G... – parsecer Dec 6 '19 at 23:06
  • Its possible that there are open file handles. Doing something like this: sudo lsof |grep -i delete . On my system right now there are 10037 files that are being held open but marked for deletion. This can eat some significant space – stratus Dec 6 '19 at 23:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.