Sorry to revive this topic after such a long time, but regarding the question SirPsycho asked, about being sure that only the symlink is deleted and not the original directory:
The deciding factor here is the trailing /
, so if we would have a symlink called /usr/local/symlink
, then the command:
# rm /usr/local/symlink
will delete the symlink, while
# rm /usr/local/symlink/
will delete the files in the directory the symlink points to.
So be carefull with trailing slashes when working with symlinks!