Ubuntu – Low disk space (free space was > 500 GB yesterday)

Ubuntu – Low disk space (free space was > 500 GB yesterday)


Following is the output of df -h on my system.

Filesystem      Size  Used Avail Use% Mounted on
udev             63G     0   63G   0% /dev
tmpfs            13G   18M   13G   1% /run
/dev/sdc4       822G  801G     0 100% /
tmpfs            63G   64M   63G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs            63G     0   63G   0% /sys/fs/cgroup
/dev/nvme1n1p2   96M   75M   22M  79% /boot/efi
cgmfs           100K     0  100K   0% /run/cgmanager/fs
tmpfs            13G   88K   13G   1% /run/user/1000

Using du -xsch /home, I get the following:

60G /home
60G total

Using free -m, I get the following:

total        used        free      shared  buff/cache   available
Mem:         128831        8648       16405         147      103777      118367
Swap:        130986          18      130968

I only recently moved to using Linux, so I am not aware yet of how the disk partitioning is used. It also seems weird that my system had more than 500 GB yesterday, but just today it’s started to show Free space: 0 bytes at the bottom of every folder I open. This space error is causing things to hangup.

EDIT: I have deleted some files in excess of 40 GB, but it still shows Free space: 0 bytes at the bottom of each folder, and does not allow me to copy any files. I am stunned that it was showing ~550 GB yesterday as the free space and suddenly all of it vanished, although there was nothing I did to occupy that space.

Best Answer

  • It’s entirely possible that some file is bloating and eating up your space. I am remembering an old X-org bug where text files would use all your available disk space for logging errors or whatever until you disabled it.

    Try running this command in the terminal:

    find / -size +1G -type f -exec du -Sh {} + | sort -rh | head -n 5

    You’ll probably get a lot of “permission denied” errors, but that should be fine. If a file is ballooning out of control, I would suspect the file will be somewhere in space where you do have permission. That command will return the size and location of the 5 largest files on your system.

    If that command does not work due to your lack of space (I think it will), you may have better success doing something like:

    find / -size +1G | grep -v find | less

    Which should find any file on your computer that is larger than 1 gigabyte in size, filter out any errors, and present the results for your review. You can then investigate any unfamiliar files.

    If there is a file growing uncontrollably, you should then be able to delete it or conduct additional research on what it is – it may be a bug or a log you can disable.

  • Add a Comment

    Your email address will not be published. Required fields are marked *