Jump to content
vitor

Failing to delete `.Spotlight-V100`

Recommended Posts

On Rebuild macOS Metadata, if I also select Delete /.Spotlight-V100 I get rm: /.Spotlight-V100: Operation not permitted in Apple’s Terminal.


In trying to diagnose this, I tried sudo rm -r /.Spotlight-V100 in that Terminal and got the same result. I thought it might be some SIP thing, but it’s not mentioned in Apple’s support page and if I try that exact same command in iTerm2, it succeeds! Next I thought it might be some configuration in my shell, so I got back to Apple’s Terminal and loaded /usr/local/bin/zsh before retrying. Same error.


My testing was very limited and I’ll need to think a bit more about what’s causing this discrepancy between terminal apps, but I’m reporting it as a bug worth checking because Alfred opens Apple’s Terminal to perform the deletion, so the error may be happening to more people — my Terminal is kept in pristine condition (i.e. I don’t alter it) to have it as close as possible to a vanilla installation (for testing).

Share this post


Link to post

@vitor if you give Terminal.app Full Disk Access (in the macOS Security & Privacy), this should work as expected.

 

I have a few internal notes to make this more clear, or potentially work around this issue by temporarily elevating Alfred's own permissions (by asking username / password) to delete this outside of Terminal, but this would also rely on Alfred being granted Full Disk Access.

Share this post


Link to post
3 hours ago, Andrew said:

if you give Terminal.app Full Disk Access (in the macOS Security & Privacy), this should work as expected.

 

Ah, of course, those blasted permissions. It still bothers me that the company that made fun of Window’s UAC built a worse system. At least Windows asked — macOS asks for some, but for others (like here) it just fails.

 

 

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...