Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-18-2006, 07:20 PM   #1
Registered: Mar 2006
Location: Austria
Distribution: Ubuntu Breezy 5.10
Posts: 32

Rep: Reputation: 15
How can I remove symbolic links?


I would like to know how can I remove symbolic link, e.g.,

ln -s /usr/local/bin/ccache /usr/local/bin/g++
Thank you very much.

Best wishes,
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 04-18-2006, 07:26 PM   #2
Senior Member
Registered: Sep 2004
Distribution: slackware
Posts: 1,839

Rep: Reputation: 276Reputation: 276Reputation: 276
rm /usr/local/bin/g++
Old 04-18-2006, 07:32 PM   #3
Senior Member
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
Removing the symbolic link (the linkfile itself) just removes that link and not the file it's linked to, for the record. You can safely use "rm" (or as safe as 'rm' ever is) to remove that linkfile, as rkelsen pointed out above.
Old 04-19-2006, 05:32 AM   #4
Registered: Mar 2006
Location: Austria
Distribution: Ubuntu Breezy 5.10
Posts: 32

Original Poster
Rep: Reputation: 15

Thank you very much for your help .

Best wishes,
Old 10-07-2009, 11:28 PM   #5
Registered: Mar 2007
Posts: 61

Rep: Reputation: 18
I was just experiencing a little trip up with this that wasn't intuitive to me. Maybe others that come across this thread may be like me.

When removing a sym-link, remember that your dealing with a file! A sym-link that points to a directory will auto fill with a backslash at the end, which is not what you want when removing it. If you're deleting a sym-link that refers to a directory, and you use auto complete to finish naming the link, remember to remove the trailing backslash.
3 members found this post helpful.
Old 11-19-2009, 08:45 AM   #6
Senior Member
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 201Reputation: 201Reputation: 201
That was good to know. It just helped me to clarify as well. Thank you.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Symbolic Links suavecu Linux - Software 1 01-11-2006 11:04 PM
help with symbolic links sopiaz57 Linux - General 2 06-11-2004 07:17 PM
Symbolic links? TongueTied Linux - Newbie 3 08-27-2003 07:00 AM
Symbolic links pdstatha Programming 1 04-08-2002 10:50 PM
symbolic links NoahsMyBro Linux - Newbie 1 11-16-2001 12:13 PM

All times are GMT -5. The time now is 12:04 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration