From time to time, you might need to free up disk space, but where do you start? How can you quickly locate those large files taking up valuable storage? Let’s explore some options. Spoiler alert: The first two are my top picks!
Terminal
Command to Locate Large Files
|
|
/
: Search from the root directory (change to specific directories like /home or /var for faster results).
-type f
: Search for files only.
-size +2000M
: Files larger than 2000 MB.
2>/dev/null
: Suppress permission denied errors.
Ncdu
Install ncdu:
|
|
Run ncdu:
|
|
Use arrow keys to navigate
GUI tool
If you prefer graphical tools, you can use baobab:
|
|
Package cache
Check cache size:
|
|
Clean package cache:
|
|
To remove all cached packages:
|
|
Log files
Check log sizes:
|
|
Clear logs ( use with caution !!! ):
|
|