5

The solutions posted here at: Silencing "Your disk is almost full" notification don't seem to work anymore, for me.

In particular, when I do

/System/Library/PrivateFrameworks/StorageManagement.framework/Versions/A/Resources/diskspaced help

I get

2018-08-24 15:57:33.461 diskspaced[8330:542479] Domain: com.apple.diskspaced
Supported keys:
2018-08-24 15:57:33.463 diskspaced[8330:542479] debugLog (BOOL) - log additional debug information. Default: NO
2018-08-24 15:57:33.463 diskspaced[8330:542479] checkAllVolumes (BOOL) - check all volumes. Default: NO
2018-08-24 15:57:33.464 diskspaced[8330:542479] minDiskSize (int) - minimal disk size in GB. Default: 128
2018-08-24 15:57:33.464 diskspaced[8330:542479] minFreeSpace (int) - minimal free size in GB. Default: 20
2018-08-24 15:57:33.464 diskspaced[8330:542479] minPurgeableSpace (int) - minimal purgeabe space size in GB. Default: 20
2018-08-24 15:57:33.464 diskspaced[8330:542479] ---
2018-08-24 15:57:33.464 diskspaced[8330:542479] Commands:
removeAllNotifications - Removes all scheduled and delivered user notificiations.

which seems to be different from the properties that one of the answers suggested to change.

How can I disable the low storage space notifications?

I am using (MacOS High Sierra 10.13.6).

liyuan
  • 254
  • 1
  • 4
  • 11
  • The linked question is not about low memory, but low storage space. Could you clarify what your intent is? – Tetsujin Aug 24 '18 at 08:33
  • Sorry I am asking about low storage space. – liyuan Aug 24 '18 at 09:09
  • Did you try both launchctl unload -w /System/Library/LaunchAgents/com.apple.diskspaced.plist and defaults write com.apple.diskspaced minFreeSpace 10 from the linked answer but you still get the log storage space notification? Did you get any error messages when stopping the daemon or changing the default? – jaume Aug 24 '18 at 09:18
  • 1
    For the first command I get "Operation not permitted while System Integrity Protection is engaged" – liyuan Aug 24 '18 at 09:21
  • 1
    The second one just doesn't work, I don't get any messages, but when I run/System/Library/PrivateFrameworks/StorageManagement.framework/Versions/A/Resources/diskspaced help I see that minFreeSpace doesn't change, and I still get the notifications – liyuan Aug 24 '18 at 09:22
  • Curious, since one of this is well documented, but did you try running /System/Library/PrivateFrameworks/StorageManagement.framework/Versions/A/Resources/diskspaced removeAllNotifications ? Also, I imagine you could edit the /System/Library/LaunchAgents/com.apple.diskspaced.plist file to stop it it from running to begin with try adding <key>Disabled</key></true/> – sdmeyers Aug 24 '18 at 14:31
  • 1
    removeAllNotifications doesn't work, and I can't edit the plist, it tells me I have no rights – liyuan Aug 25 '18 at 07:14
  • I have the same issue @liyuan - nothing works for me and it's extremely annoying. Did you find a solution? – MicroMachine Jun 17 '20 at 20:53

1 Answers1

7

Since macOS Mojave, you can no longer stop this Agent with launchctl, nor can you edit the plist file. However, you can add an override to prevent it starting by following these steps:

  1. Restart your Mac, and hold down Cmd+R to enter recovery mode
  2. At the recovery mode screen after it loads, select Utilities > Terminal
  3. Execute the command "csrutil disable"
  4. Reboot your Mac, and launch Terminal
  5. Edit the file /var/db/launchd.db/com.apple.launchd/overrides.plist using any text editor (I use vi). You will need to sudo this!
  6. Add the following text

    <key>com.apple.diskspaced</key>
    <dict>
            <key>Disabled</key>
            <true/>
    </dict>
    
  7. Reboot your Mac again, and once again go into Recovery mode. This time, launch Terminal and enter the command "csrutil enable" before rebooting.

diskspaced will now no longer start, as launchd will see an override that forcibly disables it. Voila.

Kyanar
  • 81