Here are some commands I use to find out what is eating all of my disk space on a remote server:
df -h Shows how much disk space is available. The -h means that you get G for gigabytes, M for megabytes etc.
sudo du -k / | sort -n Shows which directories are biggest (starting at the root directory /). The biggest ones will be printed at the bottom of the list. The sudo allows du to check directories that your user doesn’t have permission for. To check your home directory only use du -k ~ | sort -n
du -ka | sort -n Shows the size of all the files and sub-directories of the current directory. The biggest ones at the bottom of the list.
watch 'du -ka | sort -nr' Shows the size of all the files and sub-directories of the current directory. The biggest ones at the top of the list. The list is updated every 2 seconds. This is useful for watching disk usage in a particular directory, such as an upload directory on a web server.
Tags: linux