How to check Disk Usage on Linux ("no space left on device") ?
- Dominant language
- Shell
- Stars
- 443
- Forks
- 177
- PR merge metrics
- No merged PRs in 30d
Description
reading: https://unix.stackexchange.com/questions/125429/tracking-down-where-disk-space-has-gone-on-linux
most popular answer recommends `ncdu` ("NCurses Disk Usage"): https://dev.yorhel.nl/ncdu
which uses: https://en.wikipedia.org/wiki/Ncurses
So I need to install both `ncurses` and `ncdu` for Centos ...
Install EPEL (Extra Packages for Enterprise Linux)
https://fedoraproject.org/wiki/EPEL
```sh
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
```
Unfortunately, I get the **`No space left on device`** error when attempting to install (_duh!_)

So I need to use (_good old_) `du` _first_!
```sh
du -Pshx /* 2>/dev/null
```

In the `/home` directory, run: `du -sm * | sort -n`


# You have new mail in /var/spool/mail/root
to read the "mail" run:
```sh
cat /var/spool/mail/root
```
via: https://superuser.com/questions/306163/what-is-the-you-have-new-mail-message-in-linux-unix
After deleting a few of the "stale" apps:

I can _re-attempt_ to install `ncdu`:
```sh
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
```
followed by:
```sh
yum install ncdu -y
```

Run `ncdu` and then navigate!

Turns out the disk hog is the `node_modules` cache ... 🙄
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.