Jump to content
vitor

Failing to delete `.Spotlight-V100` [Improved in 4.0.6 b1123 pre-release]

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
Share on other sites

@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
Share on other sites
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
Share on other sites

×
×
  • Create New...