How to get rid of system is low in storage space notification (MacOS High Sierra 10.13.6)

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).


Solution 1:

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.