Sample Header Ad - 728x90

How to remove a file from root directory in macOS?

1 vote
1 answer
361 views
On my Mac (macOS Sonoma 14.5), I have created a symlink file in the root directory (/) a long time ago. I just noticed that it must have been moved from Mac to Mac by the Migration Assistant, so that it is still there, but now protected in a way that I cannot remove it any more. I tried 1. boot to recovery mode 1. disable SIP (csrutil disable) 1. boot back into macOS Trying to remove the symlink file, this got refused because the file system is read-only. So I tried sudo mount -uw / which I had found somewhere on the web, but then got mount_apfs: volume could not be mounted: Permission denied mount: / failed with 66 In recovery mode, the symlink is not visible, so I can't do anything from there. It seems it's merged somehow into the root directory only when booting into macOS, but I don't know where it comes from then. I'm stuck there - what else can I do to get rid of the old symlink file? ----- Note that there are similar questions, but they are old and their answers don't seem to work any more on a modern sealed macOS boot volume, so I decided to ask a new question.
Asked by not2savvy (2070 rep)
May 24, 2024, 04:11 PM
Last activity: May 25, 2024, 10:09 PM