My Macbook Pro has run out of disk space, and I cannot find out why.
I have minimal Applications and user data.
Output from df -h
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk1 233Gi 227Gi 5.8Gi 98% 59462769 1518477 98% /
devfs 182Ki 182Ki 0Bi 100% 630 0 100% /dev
map -hosts 0Bi 0Bi 0Bi 100% 0 0 100% /net
map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /home
As you can see here, it is reporting that I have around 6GB
free space.
I then used ncdu
to try get a better understanding of what was actually using the space
As you can see, ncdu
is reporting that I have used about 30GB
of space, which looks right to me.
I am obviously looking at something incorrectly here.
Any insights?
Best Answer
Try
sudo ncdu
instead. As a normal admin or user you are not allowed to scan the content of certain folders (all indicated by an error while scanning and in the final listing by a dot - if a subfolder can't be scanned - or an exclamation mark - if the whole folder is excluded from scanning due to missing read permissions!).Examples (only the big six and the .Spotlight-V100 folder are shown here):
ncdu
:sudo ncdu
:Another nice perl hack is this command:
It will sort all folders (not just those in the current folder) depending on size similar to Grand Perspective without bricks: