I recently cleaned up useless software on my computer, and found that the uninstall software reported "This operation cannot be completed, xxx is locked", and I couldn't uninstall it anyway. I will record it here and use it as a note.
Look at the icon below, which is the logo with a lock on it.
After checking on the Internet, it is generally said that right-clicking to view the profile, and then finding that it is locked, you need to use the command line to delete it.
sudo rm -rf xxx.app
Found that it doesn't work. report error
rm: FortiClient.app/Contents: Operation not permitted
The error prompts that the permissions of this software are very high, and the conventional method really cannot be uninstalled~~~~~
Therefore, you must first find this software, modify its permissions, and then uninstall it.
-
/bin/ls -dleO@ The path of your APP (you can directly drag it in from the application management)
and press Enter, you will find that drwxr-xr-x 3 root admin 96 10 21 19:33 The path of your APP is printed next -
sudo /usr/bin/chflags -R noschg the path of your APP
and then enter the password, and then find that the application is unlocked, -
Then sudo rm -rf xxx.app can be deleted
Click to send the official account link, scan the QR code to follow [Audio and Video Development Training Camp]