MacOS – How to delete a locked app, Karabiner

karabinermacos

I'm running High Sierra on my older iMac. I recently loaded the Karabiner-elements.app but when I tried to delete it, a message appeared that said it was locked and couldn't be deleted. So I opened Get Info for it and confirmed that the app was locked. I couldn't uncheck the locked box so I clicked on the ? icon at the bottom. The box where I can uncheck the lock feature is still greyed out.

enter image description here

I also opened a terminal window and navigated to the /Applications folder. I determined that the Karabiner app was there and I typed sudo rm -r Karabiner-Elements.app but I got a message that said Operation not permitted.

How do I delete this app?

Best Answer

It should be done in the app itself.

In “Misc” tab, press the "Uninstall Karabiner-Elements" button.

You can also uninstall Karabiner-Elements from command line.

$ sudo '/Library/Application Support/org.pqrs/Karabiner-Elements/uninstall_core.sh'

Documentation


For any other app/file which are locked, try to unlock it by unchecking the "locked" box in "Get Info" first.

If the box is greyed out, run the following in Terminal:

cd "/Applications"
sudo chflags noschg "Karabiner-Elements.app"

Then delete it by right click > "Move to Trash"

Read more about noschg at man chflags.