MacOS Sierra - Cannot find what is using all disk space

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:

       10,7 GiB [##########] /Applications                                                                                               
    .   4,8 GiB [####      ] /System
    .   3,5 GiB [###       ] /Library
    .   2,2 GiB [##        ] /usr
    .   1,8 GiB [#         ] /private
    .   1,1 GiB [#         ] /Users
                 ...
    !   0,0   B [          ] /.Spotlight-V100
    
  • sudo ncdu:

    .  10,7 GiB [##########] /Applications                                                                                               
        6,3 GiB [#####     ] /System
        5,2 GiB [####      ] /Library
        2,6 GiB [##        ] /private
        2,4 GiB [##        ] /usr
        1,2 GiB [#         ] /Users
                 ...
      310,7 MiB [          ] /.Spotlight-V100
    

Another nice perl hack is this command:

sudo perl -e'%h=map{/.\s/;99**(ord$&&7)-$`,$_}`du -h`;die@h{sort%h}'

It will sort all folders (not just those in the current folder) depending on size similar to Grand Perspective without bricks:

 29G    .
 11G    ./Applications
7,4G    ./Applications/Xcode.app
6,3G    ./System
5,2G    ./Library
2,4G    ./usr
1,9G    ./usr/local
966M    ./Users/user/Library
879M    ./System/Library/PrivateFrameworks
851M    ./Applications/MAMP
850M    ./private/var/db/dyld
805M    ./usr/local/mysql-5.7.11-osx10.9-x86_64/lib
778M    ./System/Library/Frameworks
...

While I'm a big-enough fan of du and ncdu, sometimes it's still useful to try a GUI.

Here's Grand Perspective's output of my MBP's after-market SSD, scanned from /:

Grand Perspective scan results

I can see that Xcode.app is the largest entry in my /Applications folder, for example. (I also just found 9GB that I could free up from an old Deleted User home folder.)


While ncdu is excellent (and this is not a knock against it) there are a couple of built in commands you can try if you don't want to install (or can't) 3rd party utilities:

sudo du -hsx -d 1 / | sort

This command lists all files from the root directory but excludes any file system mounts (i.e. USB or network mounts) and sorts from smallest to largest. For example, issuing the command on my iMac, I get the following results:

  0B    /.Trashes
  0B    /.vol
  0B    /Network
  0B    /cores
 30G    /Applications
 64K    /Volumes
1.0K    /home
1.0K    /net
1.0M    /sbin
2.5M    /bin
234M    /.fseventsd
261G    /Users
314G    /
383M    /.cleverfiles
4.7G    /Library
478M    /.DocumentRevisions-V100
5.0K    /dev
523M    /usr
7.1G    /private
811M    /.Spotlight-V100
9.1G    /System

This gives me a nice summary of what starge the top level folders are using on my drive. In my case, the /Applications folder is consuming 30G while my /Users has 261G.

If you want to take a look at everything within your Applications folder and sort it by size, you can issue the command

sudo du -ha /Applications | sort -r

I pipe the output to sort and use the -r flag to sort it in reverse (largest to smallest) order so I can see what files and directories are taking up what space.

996K    /Applications//The Unarchiver.app/Contents/Frameworks/XADMaster.framework/Versions
996K    /Applications//Microsoft Word.app/Contents/SharedSupport/Proofing Tools/Latvian Speller.proofingtool/Contents/SharedSupport/LatvianSpeller.lexicon/Contents/Resources/LexiconData
996K    /Applications//Microsoft Word.app/Contents/SharedSupport/Proofing Tools/Latvian Speller.proofingtool/Contents/SharedSupport/LatvianSpeller.lexicon/Contents/Resources
996K    /Applications//Microsoft Word.app/Contents/SharedSupport/Proofing Tools/Latvian Speller.proofingtool/Contents/SharedSupport/LatvianSpeller.lexicon/Contents
996K    /Applications//Microsoft Word.app/Contents/SharedSupport/Proofing Tools/Latvian Speller.proofingtool/Contents/SharedSupport/LatvianSpeller.lexicon
996K    /Applications//Microsoft Word.app/Contents/SharedSupport/Proofing Tools/Latvian Speller.proofingtool/Contents/SharedSupport

The listing will be quite long, so I suggest sending the output to a text file for evaluation:

sudo du -ha /Applications | sort -r > ~/Desktop/du_results.txt

This will give you a text file on your Desktop which you can view with any text editor. This way you will have a record of what files/subdirectories you need/want to investigate as to why you are consuming so much disk space.