1

I faced a space problem on my Ubuntu instance in Oracle Cloud. There is only 4 GB left(after cleaning), however I expect that there should be much more available space.

When I run df -h I get this result:


ubuntu@instance-20240728-1613:/dev$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            432M     0  432M   0% /dev
tmpfs            96M  1.4M   94M   2% /run
/dev/sda1        45G   41G  4.7G  90% /
tmpfs           477M     0  477M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           477M     0  477M   0% /sys/fs/cgroup
/dev/loop0       56M   56M     0 100% /snap/core18/2855
/dev/loop2      270M  270M     0 100% /snap/dotnet-sdk/255
/dev/loop1       56M   56M     0 100% /snap/core18/2846
/dev/loop3       64M   64M     0 100% /snap/core20/2434
/dev/loop7       92M   92M     0 100% /snap/lxd/29619
/dev/loop6       78M   78M     0 100% /snap/oracle-cloud-agent/72
/dev/loop5       92M   92M     0 100% /snap/lxd/32662
/dev/loop4       64M   64M     0 100% /snap/core20/2496
/dev/loop8       89M   89M     0 100% /snap/oracle-cloud-agent/94
/dev/loop9       45M   45M     0 100% /snap/snapd/23545
/dev/loop11      45M   45M     0 100% /snap/snapd/23771
/dev/loop10     270M  270M     0 100% /snap/dotnet-sdk/256
/dev/sda15      105M  6.1M   99M   6% /boot/efi
tmpfs            96M     0   96M   0% /run/user/1001

47 GB available, 41 GB used.

I tried to figure out what takes all the space using ncdu.

But it found only 14 GB.

------------------------------------------------
.   4.1 GiB [##########] /snap
.   3.7 GiB [######### ] /var
    3.1 GiB [#######   ] /usr
.   2.9 GiB [#######   ] /home
. 205.8 MiB [          ] /boot
.   7.1 MiB [          ] /etc
.   1.1 MiB [          ] /run
.  48.0 KiB [          ] /tmp
!  16.0 KiB [          ] /lost+found
.   8.0 KiB [          ] /opt
e   4.0 KiB [          ] /srv
!   4.0 KiB [          ] /root
e   4.0 KiB [          ] /mnt
e   4.0 KiB [          ] /media
.   0.0   B [          ] /proc
.   0.0   B [          ] /sys
    0.0   B [          ] /dev
@   0.0   B [          ]  libx32
@   0.0   B [          ]  lib64
@   0.0   B [          ]  lib32
@   0.0   B [          ]  sbin
@   0.0   B [          ]  lib
@   0.0   B [          ]  bin
    0.0   B [          ]  .autorelabel

How to find out what all the space is? Why there is a difference of 35 GB between ncdu and df -h?

NotTheDr01ds
  • 22,082
Anton
  • 111

1 Answers1

1

I found the reason. The reason was in Docker images. After removing old ones by docker system prune, I got the free space

Answer moved here from OP's question.

NotTheDr01ds
  • 22,082