Skip to main content
Monitoring disk space is essential for maintaining system performance and preventing storage issues.
1

Open terminal

Press Ctrl+Alt+T to open the terminal.
2

Check disk usage summary

View overall disk usage for all mounted filesystems:
df -h
The -h flag shows sizes in human-readable format (GB, MB, etc.).
3

Check specific folder size

Analyze the size of a specific directory:
du -sh /path/to/folder
Examples:
du -sh /home
du -sh /var/log
du -sh ~/Downloads
4

List top 10 large folders

Find the largest directories in the filesystem:
du -ahx / | sort -rh | head -n 10
This command:
  • du -ahx - Shows all files and directories, human-readable, don’t cross filesystem boundaries
  • sort -rh - Sorts by size in reverse order (largest first)
  • head -n 10 - Shows only the top 10 results

Additional disk space commands

Check inode usage

df -i

Show disk usage by filesystem type

df -T

Check specific directory tree

du -h --max-depth=2 /path/to/directory

Find large files

find /path/to/search -type f -size +100M -exec ls -lh {} \;

GUI alternatives

Install Disk Usage Analyzer

sudo apt install baobab

Use System Monitor

  • Open System Monitor
  • Go to File Systems tab
  • View disk usage information

Disk cleanup tips

Remove old packages

sudo apt autoremove
sudo apt autoclean

Clear package cache

sudo apt clean

Remove old log files

sudo journalctl --vacuum-time=7d

Clear browser cache

rm -rf ~/.cache/mozilla/firefox/*.default*/cache2

Next Steps

Regular disk space monitoring helps you:
  • Prevent system slowdowns
  • Identify space-consuming applications
  • Plan storage upgrades
  • Maintain system health

Build docs developers (and LLMs) love