When you plug a USB flash drive or an external hard drive into a Mac, macOS aggressively mounts the filesystem. If you physically yank the USB cable out without right-clicking the drive and selecting “Eject” first, macOS will freeze your screen and throw a massive, scolding error message: “Disk Not Ejected Properly.”
While this warning exists to prevent data corruption on mechanical spinning hard drives, it is completely obsolete if you are using modern solid-state flash drives and only reading data from them. If you are tired of being scolded by your operating system every time you unplug a thumb drive, you can use a hidden Terminal command to completely block this specific notification from appearing.
How to Completely Block Mac Disk Not Ejected Properly Warnings
You must use the Terminal to modify the default notification behavior of the macOS kernel.
- Open the Finder, go to Applications, open the Utilities folder, and double-click Terminal.
- To completely silence the external drive ejection warnings, carefully copy and paste the following exact command:
sudo defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin -bool true - (Note: While the command references mounting, this specific legacy plist flag also silences the unmount daemon warnings on modern macOS versions).
- Press Enter. Type your administrator password (the characters will remain invisible) and press Enter again.
- Next, we must restart the notification center to clear its cache. Type this command and press Enter:
killall NotificationCenter
From now on, if you pull a USB drive out of your Mac without ejecting it first, the computer will remain completely silent. The terrifying scolding banner will never appear again. Warning: While the notification is gone, you should still avoid yanking out a drive if you are actively copying files to it, as this can still corrupt your data.