Mac uninstall software prompts locked

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.
insert image description here

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.
insert image description here

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.

  1. /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

  2. sudo /usr/bin/chflags -R noschg the path of your APP
    and then enter the password, and then find that the application is unlocked,

  3. Then sudo rm -rf xxx.app can be deleted

insert image description here

Click to send the official account link, scan the QR code to follow [Audio and Video Development Training Camp]

Guess you like

Origin blog.csdn.net/machh/article/details/124749216