I ran out of disk space on an ubuntu server. How can I know how the disk space is being used so I can clean up the disk / delete unnecessary files?
df -h: will tell you space usage of all mounted filesystems.
du -sh: will tell you space usage of current directory.
du -h --max-depth=1: will tell you space usage of each directory in current directory.
Try NCurses Disk Usage. It is pretty darn usable as an end-user tool (as opposed to something a programmer might use in a script).
Listing files/folders by size in descending order;
du -sk * |sort -rn
In human readable sizes (GNU sort only);
du -sh * |sort -rh
du is the command for the job as it will give you the disk usage.
Try to run
du -sh at your root directory and then on the directories below.
Hope this helps.
a graphical program that I like is
KDirStat. Someone else mentioned
ncdu and it's nice.
KDirStat gives you one huge overview of your entire drive.