13

So I am trying to silence the "Your Disk is Almost Full" notification from a mac running Mojave, as right now it pops up way too frequently and it is so annoying.

I followed all answers from this thread but none of them work with Mojave.

However, I made some progress as @kenorb's answer includes this command:

grep -A6 debugLog <(strings $(find /System/Library/PrivateFrameworks -name diskspaced -print -quit))

which does give some insight into how things have changed, as when I run a modified version of it, I get this:

MacBook-Pro-7:~ QH$ grep -A15 debugLog <(strings $(find /System/Library/PrivateFrameworks -name diskspaced -print -quit))

debugLog (BOOL) - log additional debug information. Default: NO
Commands:
removeAllNotifications - Removes all scheduled and delivered user notificiations.
removeAllNotifications
com.apple.diskspaced
_mbsetupuser
Ignoring low disk notification during migration.
event
low_disk
STORAGE_CRITICALLY_LOW
STORAGE_CRITICALLY_LOW_INFO
volumeURL
Low space alert: %@ free on '%@'
Unknown command
peer error: %s
unexpected peer event
--
debugLog
systemUpdateDate
com.apple.updatesettings
Interval since system update :%f
alloc
init
lowSpaceTimer
invalidate
setLowSpaceTimer:
_centerForIdentifier:type:
deliveredNotifications
countByEnumeratingWithState:objects:count:
removeDeliveredNotification:
scheduledNotifications
removeScheduledNotification:
count

Now I don't understand much about that command or macOS daemons at all, but it seems to me that the lowSpaceTimer or setLowSpaceTimer: might be the key to fixing things. If I can get access to one of them, and set the timer to be something high enough, I will finally get some closure on that annoying pop up. The thing is... I have no idea how to access it.

I've tried:

defaults read lowSpaceTimer

defaults read com.apple.diskspaced lowSpaceTimer

defaults read com.apple.diskspaced (this outputs the minFreeSpace k-v entry I wrote while trying to get it to work, but does nothing to help things as minFreeSpace is obsolete)

Right now the popup shows up once every 6 minutes and it's driving me insane when I try to get work done.

  • ...then move some data to another location. The warning is like the oil light in your car; if you ignore it, or put a piece of black electrical tape over it, who is to blame when the engine blows up? – Tetsujin Nov 14 '18 at 19:45
  • 2
    I have 15 GB free on my laptop. If the oil light in my car is faulty, and I can't fix it (set the threshold to lower as in the linked thread), I might as well turn it off. – QuantumHoneybees Nov 14 '18 at 19:52
  • to carry the metaphor - 15GB is in danger of seizing the engine altogether. Your oil light isn't faulty, you just think that 150ml of oil from a capacity of 2.5 litres is enough... it isn't. – Tetsujin Nov 14 '18 at 20:01
  • 2
    Ok, so I have 128GB's of storage on my laptop. I always operate on 10-15 GB's of free space. I have a lot of applications/files that are critical to my daily functions that I can't remove. Is this a good setup? no. Can I fix it? not realistically, no. Have I been working with this setup for the past 4 years? Yes. I clear my browser's cache and file system regularly but the best I can practically have is 15GBs free. As much as I understand and appreciate your advice, I know what I'm doing. I just want that popup to stop showing up. – QuantumHoneybees Nov 14 '18 at 20:10
  • 1
    What if you try: defaults write com.apple.diskspaced removeAllNotifications? – kenorb Nov 14 '18 at 20:20
3

It's most likely not the answer that you're looking for, but suddenly I discovered a simple and trivial thing - "do not disturb" mode silences that notification, along with all the others of course...

I know that it's not a proper solution, but I'll stick with it by now. How could I've been so blind :D

  • 1
    Yeah, I use do not disturb when I need to focus and it keeps popping up. The problem is that the other notifications are actually important and relevant. You can toggle Do Not Disturb by alt-clicking on the notification center symbol on the top right of the menu bar by the way – QuantumHoneybees Dec 5 '18 at 15:52
  • Worked for my purposes. Got to notification center and click the slider. – Ligemer May 3 at 18:33
2

Try the following command:

defaults write com.apple.diskspaced removeAllNotifications -bool true

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

0

defaults read com.apple.diskspaced yields:

{
     checkAllVolumes = 0;
     debugLog = 1;
     freeSpaceWarningLevel = 4;
     minFreeSpace = 4;
     removeAllNotifications = 0;
     warningInterval = 3600;
}

Now you can change it with, say, defaults write com.apple.diskspaced freeSpaceWarningLevel 1, and restart: killall diskspaced.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .