Jump to content

Remove ln -s

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1
Guest_Jame_*

Guest_Jame_*
  • Guests
How do I remove a soft link created with ln -s? I've done a man on ln and cannot find any information.

#2
Hektor

Hektor

    Programmer

  • Members
  • PipPipPipPip
  • 126 posts
I don't know if this is the correct way or not but I have always renamed the directory it was pointing to and then rm -rf the symbolic link.

#3
Prog

Prog

    Learning Programmer

  • Members
  • PipPipPip
  • 98 posts
rm -rf the link and I think it will not remove the real directory

#4
Guest_Jordan_*

Guest_Jordan_*
  • Guests
You can do a simple:

rm <dirname>

The linked directory doesn't have to be empty and you don't have to use rm -rf.

#5
Guest_Jame_*

Guest_Jame_*
  • Guests
Thanks, works!