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…