QUICK GUIDE: Clearing Disk Space
------------------------------------------------------------------------------------------------------------------------------------------
NCDU is a command line tool that can be used to review disk usage across a filesystem.
ncdu /
Note: You can specify a directory other than /. ie if you wanted to review the contents of /var, you would format the command as follows:
ncdu /var
We can also use the find command to locate files over a specified size.
find / -type f -size +300M > filelist.txt
The above command would search / (and all subdirectories) for any files over 300M in size. There are various options available for size specification:
-
G-> for gibibytes
-
M-> for megabytes
-
K-> for kibibytes
-
b-> for bytes
------------------------------------------------------------------------------------------------------------------------------------------
/var/log/journal - this can be vacuumed to reduce the size:
journalctl --vacuum-size=500M
------------------------------------------------------------------------------------------------------------------------------------------