Mac OSX cannot unlock file

Posted on


I’m using Mac OSX 10.15.4.

In my /Application folder, I have a file :

localhost:Applications root# ls -al
drwxr-xr-x   3 root      wheel     96 Nov 17 21:42 Karabiner-Elements (之前).app

the characters “之前” is the Chinese word for “previous” or “before” (sorry I cannot find the word in English version). This file is automatically created by OS for duplicate app after I use Migration Assistant to transfer a user account to this Mac.

The file has “Zero Bytes”, with only one folder called Contents, which is empty. The /Application/ folder is not locked.
I just want to delete the file, but failed, because it’s locked. snapshot image: the info of the file

The lock option in general section is gray. The lock icon in the lower-right of the window is also not clickable. The privilege of wheel and everyone cannot be changed, giving the alert: The operation can’t be completed because you don’t have the necessary permission.

I have searched a lot but nothing works. I have tried :

  1. remove to trash, but got :The operation can’t be completed because the item “Karabiner-Elements (之前).app” is locked.

  2. sudo rm got Operation not permitted

  3. sudo chflags -R nouchg got nothing happens, not even error.
  4. sudo chmod 777 got chmod: Unable to change file mode on Karabiner-Elements (之前).app/: Operation not permitted

How can I delete this file?


The answers are within the image you include. The .app file/folder is “Locked” by the Finder, and you do not have permission to modify (or delete) the file.

Try clicking the lock icon in the lower-right of that Get Info window. Hopefully you can enter your credentials and then unlock the file, then delete it.

If it won’t let you unlock/delete it, but it accepts your credentials when you click the lock icon, try explicitly giving yourself R/W permission with the “+” symbol in the lower-left.

just in case anyone else was struggling with uninstalling karabiner, I found another thread which explains you must go through their own interface and press the uninstall button. See here –

Leave a Reply

Your email address will not be published. Required fields are marked *