Disable "Optimized Storage" popup
MacBook Pro with Retina display, macOS Sierra (10.12.2)
The solution to disabling the notification is to disable the daemon responsible for it:
launchctl unload -w /System/Library/LaunchAgents/com.apple.diskspaced.plist
Alternatively, you can customise the number of GB free before the alert appears via:
minFreeSpace (int) - minimal free size in GB. Default: 20
In my case I wanted to change it to 10GB, so:
defaults write com.apple.diskspaced minFreeSpace 10 launchctl unload -w /System/Library/LaunchAgents/com.apple.diskspaced.plist launchctl load -w /System/Library/LaunchAgents/com.apple.diskspaced.plist
The daemon has to be reloaded because it only reads its settings upon start up.
In case you are interested in the other preferences for these disk alerts you can view some of them using the help param:
/System/Library/PrivateFrameworks/StorageManagement.framework/Versions/A/Resources/diskspaced help
--- Domain: com.apple.diskspaced
Supported keys:
debugLog (BOOL) - log additional debug information. Default: NO
checkAllVolumes (BOOL) - check all volumes. Default: NO
minDiskSize (int) - minimal disk size in GB. Default: 128
minFreeSpace (int) - minimal free size in GB. Default: 20
minPurgeableSpace (int) - minimal purgeabe space size in GB. Default: 20
--- Commands:
removeAllNotifications - Removes all scheduled and delivered user notificiations.
And here are a couple of hidden ones:
warningInterval (integer default 0)
lastWarningDate (string e.g. 2017-05-05 16:48:29 +0000)
I didn't experiment with changing these but it is possible setting the last warning date to a date in the future would prevent any alerts displaying.
The solution to disabling the notification is to disable the daemon responsible for it:
launchctl unload -w /System/Library/LaunchAgents/com.apple.diskspaced.plist
Alternatively, you can customise the number of GB free before the alert appears via:
minFreeSpace (int) - minimal free size in GB. Default: 20
In my case I wanted to change it to 10GB, so:
defaults write com.apple.diskspaced minFreeSpace 10 launchctl unload -w /System/Library/LaunchAgents/com.apple.diskspaced.plist launchctl load -w /System/Library/LaunchAgents/com.apple.diskspaced.plist
The daemon has to be reloaded because it only reads its settings upon start up.
In case you are interested in the other preferences for these disk alerts you can view some of them using the help param:
/System/Library/PrivateFrameworks/StorageManagement.framework/Versions/A/Resources/diskspaced help
--- Domain: com.apple.diskspaced
Supported keys:
debugLog (BOOL) - log additional debug information. Default: NO
checkAllVolumes (BOOL) - check all volumes. Default: NO
minDiskSize (int) - minimal disk size in GB. Default: 128
minFreeSpace (int) - minimal free size in GB. Default: 20
minPurgeableSpace (int) - minimal purgeabe space size in GB. Default: 20
--- Commands:
removeAllNotifications - Removes all scheduled and delivered user notificiations.
And here are a couple of hidden ones:
warningInterval (integer default 0)
lastWarningDate (string e.g. 2017-05-05 16:48:29 +0000)
I didn't experiment with changing these but it is possible setting the last warning date to a date in the future would prevent any alerts displaying.
You asked how to fix the problem. I gave you the options I know and since I'm just an Apple user like you, voicing your opinion to me does you no good. You are welcome to let Apple know what you think here at Apple feedback. In the meantime use my information or ignore it.
The problem is if your free disk space is at the threshold then then alert triggers frequently, so I would like to disable it too because it is just annoying, e.g. on a 256GB with 20GB free I see the alert once a day.
Click on Manage : When you sign up for iCloud, you automatically get 5 GB of free storage. Your iCloud storage is used for documents stored in iCloud Drive, iCloud Photo Library, iOS device backups, messages and attachments in iCloud Mail (your @icloud.com email account), and more. If you run out of space, you can upgrade your storage. You can also remove stored items to make more space available.
If you have a HDD, 10 GB free may be enough, if you have a SSD the better alternative is 25 or 30 GB as a minimum: because the WearLeveling and GarbageCollection are wearing the SSD out if you do not have enough free space to keep the SSD healthy.
You have three ways to remove that popup:
These are your choices - no lecture or tutorial required.
The only way to disable that popup is to increase disk space: Free up storage space on your Mac - Apple Support.
If you fail to heed that warning, you may eventually find yourself unable to start your Mac normally as macOS exhausts a number of increasingly desperate measures to create sufficient free space for it to function.
No lecture, just fact.
Thank you, Malcolm.
Disable "Optimized Storage" popup