Tuesday, August 23, 2022

Can't empty trash because VoiceTrigger is in use: It's a macOS system integrity bug

If you delete a user account in some versions of macOS (Monterey in my case) where the user account was created in certain earlier versions of macOS you will run into a System Integrity bug.

There's a folder called VoiceTrigger that in the deleted user account that is protected by System Integrity (~/Library/VoiceTrigger/SAT. ) It's located in the User's Library, so it should not be SIP protected. (In Monterey there's nothing there called SAT).

I'm guessing the bug is that it was never supposed to be SIP protected but in some version of macOS it was. Maybe Big Sur. (There's a second bug because the error message is incorrect. The problem isn't that the file is in use, the problem is it's SIP protected.)

I found the fix in in r/MacOS - disable SIP, delete, re-enable SIP:

Disable System Integrity Protection

  1. Click the  menu.

  2. Select Restart...

  3. Hold down Command-R to boot into the Recovery System.

  4. Click the Utilities menu and select Terminal.

  5. Type csrutil disable and press return.

  6. Close the Terminal app.

  7. Click the  menu and select Restart....

Login normally, then Empty the Trash Can

Re-Enable System Integrity Protection

  1. Click the  menu.

  2. Select Restart...

  3. Hold down Command-R to boot into the Recovery System.

  4. Click the Utilities menu and select Terminal.

  5. Type csrutil enable and press return.

  6. Close the Terminal app.

  7. Click the  menu and select Restart....

Things other's suggested that didn't work:

1. Terminal: sudo rm -rf ~/.Trash/*

Note you need to be admin to do this. There's a way to escalate non-admin to use sudo but I think Apple has basically given up on non-admin user accounts.

2. Turn off iCloud document sync.

1 comment:

Unknown said...

Thank you! After many unsuccessful attempts your instructions worked beautifully.