QUICK GUIDE: Clearing Disk Space
------------------------------------------------------------------------------------------------------------------------------------------
IdentifyingNCDU whereis a command line tool that can be used to review disk spaceusage isacross beinga used:filesystem.
ncdu /
ncduNote: 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
FindWe filecan abovealso use the find command to locate files over a specificspecified size 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
------------------------------------------------------------------------------------------------------------------------------------------
Files to check:
/var/log/*
/var/log/journal - this can be vacuumed to reduce the size:
journalctl --vacuum-size=500M (removes old journal logs) ------------------------------------------------------------------------------------------------------------------------------------------
cPanel
Anything .trash (recommend client does this:)
-cpanel > Tweak Settings > Trash > Alter number of days