Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

zackshapiro25

macrumors newbie
Original poster
Mar 4, 2017
17
2
Brooklyn
I keep a notification that my MacBook Pro HDD is almost full. It's the late 2016 model with the TouchBar.
Screen%20Shot%202019-09-11%20at%2012.11.57%20PM.png


I don't have that much music on here (I use Spotify) and I don't have many photos (that's the green bar). I have no idea what this 196 GB of "System" storage is or how to reduce its file size and I'd love some recommendations or help here. Thanks!
 
Start by running the following command in a Terminal window. It will take a minute or two.

Code:
sudo du -d 1 -x -c -g /

Copy the results from the terminal window. Select the insert icon on the MR toolbar (looks like a plus), select Code and paste the results.

DS
 
Code:
0    /.HFS+ Private Directory Data
1    /home
5    /usr
du: /.Spotlight-V100: Operation not permitted
1    /net
0    /.PKInstallSandboxManager-SystemSoftware
1    /bin
0    /Network
1    /sbin
du: /Library/Application Support/com.apple.TCC: Operation not permitted
11    /Library
8    /System
1    /.fseventsd
du: /private/var/db/fpsd/dvp: Operation not permitted
du: /private/var/db/dslocal/nodes: Operation not permitted
du: /private/var/db/ConfigurationProfiles/Store: Operation not permitted
du: /private/var/folders/vs/cwnrl83n6r91kfv81k1wvqlc0000gp/0/com.apple.Safari/SafariFamily: Operation not permitted
du: /private/var/folders/vs/cwnrl83n6r91kfv81k1wvqlc0000gp/0/com.apple.LaunchServices.dv: Operation not permitted
du: /private/var/folders/vs/cwnrl83n6r91kfv81k1wvqlc0000gp/0/com.apple.nsurlsessiond: Operation not permitted
du: /private/var/folders/vs/cwnrl83n6r91kfv81k1wvqlc0000gp/0/com.apple.routined/dv: Operation not permitted
du: /private/var/folders/6n/9v3vtsss3pxd279s989x5t7w0000gn/0/SafariFamily: Operation not permitted
du: /private/var/folders/6n/9v3vtsss3pxd279s989x5t7w0000gn/0/com.apple.progressd/ClassKit: Operation not permitted
du: /private/var/folders/6n/9v3vtsss3pxd279s989x5t7w0000gn/0/com.apple.Safari/SafariFamily: Operation not permitted
du: /private/var/folders/6n/9v3vtsss3pxd279s989x5t7w0000gn/0/com.apple.LaunchServices.dv: Operation not permitted
du: /private/var/folders/6n/9v3vtsss3pxd279s989x5t7w0000gn/0/com.apple.nsurlsessiond: Operation not permitted
du: /private/var/folders/6n/9v3vtsss3pxd279s989x5t7w0000gn/0/com.apple.routined: Operation not permitted
du: /private/var/folders/6n/9v3vtsss3pxd279s989x5t7w0000gn/C/com.apple.WebKit.WebContent.Sandbox: Operation not permitted
du: /private/var/folders/6n/9v3vtsss3pxd279s989x5t7w0000gn/C/com.apple.QuickLook.thumbnailcache: Operation not permitted
du: /private/var/folders/6n/9v3vtsss3pxd279s989x5t7w0000gn/C/com.apple.WebKit.Networking.Sandbox: Operation not permitted
du: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000sm00006d/0: Operation not permitted
du: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000sm00006d/C: Operation not permitted
du: /private/var/folders/zz/zyxvpxvq6csfxvn_n00000y800007k/0/com.apple.nsurlsessiond: Operation not permitted
8    /private
1    /.DocumentRevisions-V100
0    /.vol
du: /Users/zackshapiro/Pictures/Photos Library.photoslibrary: Operation not permitted
du: /Users/zackshapiro/Library/Application Support/MobileSync: Operation not permitted
du: /Users/zackshapiro/Library/Application Support/CallHistoryTransactions: Operation not permitted
du: /Users/zackshapiro/Library/Application Support/com.apple.TCC: Operation not permitted
du: /Users/zackshapiro/Library/Application Support/CallHistoryDB: Operation not permitted
du: /Users/zackshapiro/Library/IdentityServices: Operation not permitted
du: /Users/zackshapiro/Library/Calendars: Operation not permitted
du: /Users/zackshapiro/Library/Messages: Operation not permitted
du: /Users/zackshapiro/Library/HomeKit: Operation not permitted
du: /Users/zackshapiro/Library/Mail: Operation not permitted
du: /Users/zackshapiro/Library/Safari: Operation not permitted
du: /Users/zackshapiro/Library/Suggestions: Operation not permitted
du: /Users/zackshapiro/Library/Containers/com.apple.VoiceMemos: Operation not permitted
du: /Users/zackshapiro/Library/Containers/com.apple.Home: Operation not permitted
du: /Users/zackshapiro/Library/Containers/com.apple.Safari: Operation not permitted
du: /Users/zackshapiro/Library/Containers/com.apple.iChat: Operation not permitted
du: /Users/zackshapiro/Library/Containers/com.apple.mail: Operation not permitted
du: /Users/zackshapiro/Library/Containers/com.apple.news: Operation not permitted
du: /Users/zackshapiro/Library/Containers/com.apple.stocks: Operation not permitted
du: /Users/zackshapiro/Library/PersonalizationPortrait: Operation not permitted
du: /Users/zackshapiro/Library/Metadata/CoreSpotlight: Operation not permitted
du: /Users/zackshapiro/Library/Metadata/com.apple.IntelligentSuggestions: Operation not permitted
du: /Users/zackshapiro/Library/Cookies: Operation not permitted
du: /Users/zackshapiro/Library/Caches/com.apple.safaridavclient: Operation not permitted
du: /Users/zackshapiro/Library/Caches/com.apple.HomeKit.configurations: Operation not permitted
du: /Users/zackshapiro/Library/Caches/CloudKit/com.apple.Safari: Operation not permitted
du: /Users/zackshapiro/Library/Caches/com.apple.Safari: Operation not permitted
du: /Users/zackshapiro/Library/Caches/com.apple.Safari.SafeBrowsing: Operation not permitted
du: /Users/zackshapiro/Library/Caches/com.apple.homed: Operation not permitted
142    /Users
21    /Applications
1    /opt
1    /dev
0    /Volumes
1    /data
0    /cores
194    /
194    total
 
Your big usage is /Users. The total is smaller than expected due to permissions.

You need to give Terminal full disk access in System Preferences >> Security and Privacy. Select the Privacy tab, unlock, select Terminal and then Full Disk Access. This way the protected folders in your Library directory will also be counted.

Now you can change the command from a plain / to /Users and run it again. By extending the path at the end of the command you can drill down on areas of interest.


DS
 
Thanks @dsemf. I do that and run `sudo du -d 1 -x -c -g /Users` and nothing happens. I also restarted my computer for good measure and same thing happens.
 
Thanks @dsemf. I do that and run `sudo du -d 1 -x -c -g /Users` and nothing happens. I also restarted my computer for good measure and same thing happens.
I assume that you are quoting the command for message purposes and not using them in the terminal window.

Do you at least get a password prompt?

DS
 
Correct, I was using the back ticks for formatting. I am getting the password prompt and entering my password successfully. For background, I'm an iOS engineer so I know my way around terminal and such
 
There are a number of apps that can help diagnose disk space issues, such as Daisydisk and Whatsize. Scanning as administrator with Daisy disk showed me that ~/Library was 1.4 TB. Mobile documents were 400 GB and MobileSync was 665 GB.
 
Do you back up phones / iPads to your computer? That can cause a lot of "bloat". Take a look in

/Users/Yourusername/Library/Application Support/MobileSync/Backup

If you have folders in there that have multi-Gb of data then those are backups of iOS devices - and there may even be backups of devices you don't even own any more.

To manage them you need to use iTunes. See this link:

https://support.apple.com/en-us/HT204215
 
Download the small free app called DiskWave:
https://diskwave.barthe.ph

Open Diskwave and go to preferences.
Be sure to make normally-invisible files visible.

Now, just look at Diskwave's window.
Click on anything.
It lists folders/files from largest to smallest.

What is eating up the space?
 
Okay so here's the print out. Seems like a TON of this is from XCode, the simulator and a LOT of logs.

Am I safe to clear these logs, to clear some of the CoreSim stuff?

I guess what's the best path to take going forward to clean this stuff up?
Screen%20Shot%202019-09-17%20at%205.13.04%20PM.png
 
  • Like
Reactions: drumcat
Code:
defaults write com.apple.safari WebKitDNSPrefetchingEnabled -boolean false

MacOS fills hard drives to 80% with allthethings because it's faster. It'll stay at 80%, more or less. Turn this off, and you don't have that issue.

Also, get OnyX.
 
@drumcat How does that command affect the screenshot of storage above? Seems like that's a Safari thing and my screenshot points to Xcode as the culprit for my HDD bloat
 
OP wrote:
"Okay so here's the print out. Seems like a TON of this is from XCode, the simulator and a LOT of logs.
Am I safe to clear these logs, to clear some of the CoreSim stuff?
I guess what's the best path to take going forward to clean this stuff up?"


Do you USE the XCode stuff?
If you do, you probably know more about the OS than I do.

If you do NOT use it, I'd just DELETE the ENTIRE "Developer" folder, and be done with it.

Personal experience:
I just looked in my home/library/developer folder. Nothing in it but the "CoreSimulator" folder.
I did a "command-i" "get info" on the CoreSimulator folder, and its size is:
4k.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.