Finding what's using all the space in *nix

Solution 1:

I personally like to use du -sh * to see how big each directory is within the current directory.

Also you can sort to have bigger folders first: du -shx * | sort -hr. For du:

  • -s, --summarize: display only a total for each argument
  • -h, --human-readable: print sizes in human readable format (e.g., 1K 234M 2G)
  • -x, --one-file-system: skip directories on different file systems

For sort:

  • -h, --human-numeric-sort: compare human readable numbers (e.g., 2K 1G)

Solution 2:

ncdu

Is just great: CLI, ncurses based, fast, simple. Install it with sudo apt install ncdu.

enter image description here