How to find out what is eating my disk space on Linux?
Daniel Nashed – 10 September 2024 08:56:18
If you don't know the Linux tool ncdu, this will make your day.
It's available for most distributions out of the box.
But if you are not having it in the distribution (like in a container) you can directly download it from the developer's website https://dev.yorhel.nl.
Distributions mostly have an older version. There is a 2.x version.
To download directly from the home page you can use a single curl command:
curl -sL https://dev.yorhel.nl/download/ncdu-2.5-linux-x86_64.tar.gz |tar -xz
The tool by default scans from where you are or any directory you specify.
Specially when running on WSL you might want to use excludes.
On top there is a delete option, which can be quite helpful when you find large files you don't need.
I am using it for years and it did safe my IT life more than once. And it is very fast...
See this example (the Domino blog template keeps reformatting it -- I gave up .. ):
- Comments [0]