Locked file that I can't remove
Solution 1:
I managed to figure out the problem.
First I used ls -laO
which showed the flags for all files. It turns out that both schg
and uchg
had been set on the files. To override those, I did:
sudo chflags nouchg /Applications/Karabiner-Elements.app
sudo chflags noschg /Applications/Karabiner-Elements.app
This unlocked both flags, and allowed me to delete the files.
Thank you all for your help.