HOWTO: Remove a Symbolic Link
This may seem not seem complicated, but if you don’t know, you don’ t know.
When you create a symbolic link, the link file you’ve created just points to the target file. Therefore, the link file has no other purpose in life than that. So, when you want to get rid of it, just delete the link file.
Done.

















JON, thanks for posting. I preferred the unlink method as any RM commands have to be validated by the administrator here – why? we had a newbie accidently run an rm -rf from root
– at any rate, good on ya for posting this helpful bit. I was a little worried about running rm on the link thinking it might follow the link and delete the files ( I had the link on a folder).
Ok, symbolic links are just really weird. Not only the rm -rf command follows the link, just rm seems to do it as well. That is, it doesn’t do anything for it thinks the link is a dirictory, and non-empty directories can’t be removed by just rm. But when I delete the link by pushing shift-del in nautilus, the link is removed whitout doing harm to the directory it pointed to. Both are done as root. I don’t get it…
I just had the same problem, the mistake was using
rm nameofsymlink/
what you have to run is
rm nameofsymlink
without the backspace, the first one is trying to get rid of the folder being pointed to, while the second is just using the name of the file.
Thanks for the litte bit of “extra” help there! Didn’t really know that bit..
I was going ‘WTF?!’ for like 5 minutes while trying to do something I’ve done so many times in the past.
Being so lazy after a long day I just kept hitting the tab key for auto-complete (which has ofcourse added the trailing slash)
Thanks!
on FC6 at least, your cwd has to be the directory in which the link was created for rm link to work.
this is implied by whitehorn’s post..