Cannot unset schg on M1 Mac

Hi. I am using a Mac mini with M1. I created a symlink on the Desktop folder and set schg flag so that the system would not modify the link.

Now I want to revert Desktop back to a normal folder, but the flag cannot be removed with this command:
Code Block
sudo chflags schg [path]

Normally, booting in Single User Mode is advised for removing this specific flag since the system cannot alter anything when schg flag is set. But there is no longer Single User Mode in M1 Macs. I tried removing the flag in Recovery mode with the same command but it didn't help.

What is the correct way to unset schg flag in M1 Macs?
Thanks

Any fix for this? Ran into the same issue after migrating from an Intel mac where I had symlinked ~/Desktop to my ~/Dropbox folder. Now stuck with a symlink flagged as schg that can't be deleted (so I can't go back to a stock Apple Desktop folder location if I wanted to), and also blocking Spotlight from indexing anything under it.

Have tried the Terminal in Recovery mode also, no luck, as well as disabling System Integrity Protection, and Safe mode and various combinations.

Feeling like the only fix is going to be wiping the hard drive and starting over, which is a bummer since the migration was so effortless.

Go go undocumented switches on chflags! Found this which actually works:

sudo chflags -hv noschg [Path}

Flag -R worked for me, so:

chflags -R noschg {Path}
Cannot unset schg on M1 Mac
 
 
Q