1

Recently, I was trying to get software that re-maps my mouse's buttons. I stumbled upon a software named Karabiner-Elements, which has the ability to do many things relation to keybindings. After downloading I learned that it was not the software for me, and decided to manually delete it.

However, the application was "Locked", and I was unable to remove this lock, either from the inspector or the command line using chflags nouchg file, which I found linked to another post

I even tried the sacred sudo rm -rf, and was unable to remove it. The answer on that post was using the uninstaller that I stupidly ignored, and this worked.

However, I am still curious as to how an installed software was able to embedded itself so deeply into my computer that I was unable to delete it. I tried ls -lO which returned drwxr-xr-x 7 root wheel. I am not sure what this means, other than the only way to delete this folder is through root. This leads me to my questions.

  • How was this software able to lock itself?
  • How would I go about deleting this software without using the uninstaller?
  • Is this a potential security risk on UNIX devices?

Thank you for your time.

anki
  • 11,753
yuwe
  • 63
  • There are various ways a file may appear to be undeletable. Without any details on what exactly was going on in your situation it‘s hard do get answers here. – nohillside Jun 19 '20 at 06:20
  • See the comment https://apple.stackexchange.com/questions/362662/how-to-delete-a-locked-app#comment485065_362662 " The how of this is the installer sets the schg and uchg flags. http://hints.macworld.com/article.php?story=20031017061722471" – anki Jun 19 '20 at 16:29

2 Answers2

1

Read the shell script:

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

or

In summary:

anki
  • 11,753
  • Thanks! This is really helpful and I didn't know lots of these concepts! Next time ill use the uninstaller for reference – yuwe Jun 19 '20 at 18:08
  • not all uninstaller are so descriptive.. often an opaque executable. Nice to know that it helped you – anki Jun 19 '20 at 18:14
0

Urm, Karabiner Elements literally has an Uninstall button right within its interface.

  • 2
    The OP is asking how to delete the software without using the uninstaller. – Allan Jun 19 '20 at 05:42
  • But yet wants to use the uninstaller as the reference. If you are going to do what the uninstaller does, use the uninstaller. – Marc Wilson Jun 20 '20 at 13:23