If you’re using a crappy old HDD as I do, you’re probably fighting with free storage space now and then..
But even if you’ve tons of Terabytes and various SSD/HDD to throw into your machine, well it’s most likely that you’ve some crap stored somewhere in your storage(s).

So, sometimes it’s good to check the free space available and locate the huge files/directories that you may not need anymore..

Here are 2 commands that help you do all this in a super fast and easy way:

  • df and du

to check the used and available space in your storages and partitions:

df -h


Filesystem Size Used Avail Use% Mounted on
dev        7.9G    0  7.9G   0% /dev
run        7.9G 952K  7.9G   1% /run
/dev/sda2  361G 339G  4.2G  99% /
tmpfs      7.9G 327M  7.5G   5% /dev/shm
tmpfs      7.9G    0  7.9G   0% /sys/fs/cgroup
tmpfs      7.9G  81M  7.8G   2% /tmp
tmpfs      1.6G  12K  1.6G   1% /run/user/1000

to check the disk usage (du), example:

du ~ -had 1 -t 10G


11G   ./.dolphin-emu
53G   ./.local
138G  ./.wineprefix
36G   ./Games
22G   ./Downloads
303G  .

-h print the results in a human readable way (KB, MB, GB, etc..).
-d let you select what recrusive level you want to have printed.
-t set the threshold to be printed, in this case only the directories bigger than 10G (you reverse it by adding a minus, ex: “-10G”).
-a extend the command to files too, not just directories.