At some point in the past I was messing around with the battery menu on my 2012 MacBook Pro running High Sierra to see if I could it to display the estimated time remaining rather than a percentage. Anywho, I created a copy of the file
/System/Library/CoreServices/Menu Extras/Battery.menu which I no longer needed, so I trashed it.
Since then I have been unable to move the item from the trash or delete it.
I have tried:
- deleting normally
- using the force delete option (option + delete)
- trying to drag item out of trash (makes a copy, which is deletable)
sudo rm -vrf ~/.Trash/Battery.menu(result: "Operation not permitted")
- renaming and moving the file with
sudo mv ~/.Trash/Battery.menu(result: "Operation not permitted")
- running the above commands after
- using the root account to try the above
- booting into single user mode, mounting the file system, using above commands. (result: "Operation not permitted")
setfileto try to set the busy attribute to not busy and to unlock the file (though it is not locked) using
setfile -a z ~/.Trash/Battery.menu. Result: "ERROR: Unexpected Error. (-5000) on file: /Users/myuser/.Trash/Battery.menu"
- repairing permissions, then trying everything again
- booting into recovery, turning off SIP, and trying to delete again.