As the title said, I accidentally added ~/Downloads to Dropbox, then I think Dropbox symlinked the ~/Downloads folder to the corresponding Dropbox folder.
❯ ls -l
total 648
drwx------@ 5 anthony staff 160 May 18 20:09 Applications
drwx------@ 143 anthony staff 4576 May 17 23:42 Desktop
drwx------@ 16 anthony staff 512 May 10 22:57 Documents
lrwx------+ 1 anthony staff 67 Sep 25 2020 Downloads -> /Users/anthony/Dropbox/My Mac (Yuchens-MacBook-Pro.local)/Downloads
Now I don't want Dropbox anymore and I have completely removed Dropbox from my machine including its dot folder. However, I still can't remove the symlink it left.
I tried:
~ ·············································································
❯ rm -rf Downloads
rm: Downloads: Operation not permitted
~ ·············································································
❯ sudo !!
Alias tip: _ !!
Password:
rm: Downloads: No such file or directory
~ ·········································································· 6s
❯ unlink Downloads
unlink: Downloads: Operation not permitted
~ ·············································································
❯ sudo !!
Alias tip: _ !!
unlink: Downloads: No such file or directory
# macos version
❯ sw_vers
ProductName: macOS
ProductVersion: 11.3.1
BuildVersion: 20E241
How can I remove it? It looks extremely annoying to me. Many thanks.
rm -f
, not sudo.unlink
andrm -rf
, and they all tell meDownloads: Operation not permitted