disk is full, but cannot find big files or folders

I was running into this same issue on our lab machines and using this command

du -sch .[!.]* * |sort -h

I was able to find hidden files like inside of users trash bins that they had yet to delete.

Credit to here where I originally found this answer.


Check for deleted files that are still being held open by a process:
sudo lsof | grep deleted | less

That'll show the pid and file descriptor. I had this exact problem on a server, nothing in ncdu but disk filling up. It turned out to be a nightly process that moved files to a mounted samba share and occasionally didn't close out the file handle correctly, it seems.

If you find deleted files and want to clean them up, a reboot is probably easiest if that's acceptable. Or you can try killing the process. Or if you're sure they're not being used, you can manual zero them out, with something like this:
> /proc/14487/fd/12


Following command will show disk utilization for /home directory with --max-depth=1

user@linux:~$ sudo du -h -d 1 /

We had this same issue and it turned out to be docker images, stored under var/lib/docker

ncdu does not list these as they are not visible to users. even running ncdu under sudo does not help.

This command purges all existing docker images...

docker rmi $(docker images -a -q)