MacOS – Mac OS Sierra and High Sierra occupies 95GB on the MacBook Pro 2017 128GB Edition. How to Clean

disk-spacemacbook promacosmacos-highsierramacos-sierra

I am an iOS developer. I am using a 2017 MacBook Pro with 128GB disk space to do my job (company laptop ? ). But recently, I found I don't have enough space to build my app, switch Git branches. It notices me the disk space does not have enough to do so.

I have used Disk Docter Pro to clean some caches, Developer files. But the OS disk size is still over 95 GB.

How could it happen? And, how to resolve this issue?

Storage usage screenshot

Best Answer

The window you showed gives only a basic view of the disk usage. For more thorough inspection, use the following command:

du -sh <folder>/*

Note 1: Use sudo for folders where your user does not have sufficient permissions, e.g.

$ sudo du -sh /*
 41G    /Applications
 17G    /Library
  0B    /Network
7,1G    /System
1,2T    /Users

Note 2: Add <folder>/.* to include hidden files, e.g.

$ du -sh ~/* ~/.*
592M    /Users/Mirek/Applications
8,6G    /Users/Mirek/Desktop
 14G    /Users/Mirek/Documents
 19G    /Users/Mirek/Downloads
 32K    /Users/Mirek/.DS_Store
  0B    /Users/Mirek/.TemporaryItems
687G    /Users/Mirek/.Trash

Or you can use a GUI application like DaisyDisk.

Related Question