Sobes.tech
Senior

How to find out what is taking up space on the disk if the disk is 89% full?

sobes.tech AI

Answer from AI

To determine what is taking up space on the disk when it is 89% full, you can use commands to analyze disk usage:

  • In Linux/Unix systems:
    • du -h --max-depth=1 /path/to/directory — shows the size of each folder in the specified directory.
    • du -sh * — total size of all files and folders in the current directory.
    • ncdu — an interactive tool for analyzing disk space.
    • df -h — shows the overall disk usage status.

Example:

# Check disk usage
df -h

# Analyze folder sizes in root
sudo du -h --max-depth=1 /

# For more detailed analysis
sudo du -ah / | sort -rh | head -n 20

This way, you can identify large files and folders that occupy a lot of space and decide on cleaning or moving them.

How to find out what is taking up space on the disk… - sobes.tech