A full disk can stop websites, email and databases from working. These two commands tell you how much space is left and what is using it. They only read information, so they are safe to run.
Check free space with df
df -h
-h shows sizes in GB and MB instead of bytes. Look at the line where Mounted on is /. That is your main disk. If Use% is above 90%, it is time to clean up. GNU Coreutils manual
Find what is using the space with du
du -h --max-depth=1 / 2>/dev/null | sort -h
This lists each top-level folder with its size, biggest last. Repeat it on the largest folder, for example /var, to dig deeper.
What to do next
- Old log files in
/var/logare a common cause. - Old backups in
/homeor/backupare another. - Do not delete files you do not recognise. Check what they are first.