How can I delete a symbolic link?
Be very careful.
If you have a symbolic link that is a directory (made with mklink /d
) then using del
will delete all of the files in the target directory (the directory that the link points to), rather than just the link.
SOLUTION: rmdir
on the other hand will only delete the directory link, not what the link points to.
To remove directory symbolic links created with mklink /d
it is safe to delete the symbolic link in windows explorer.
For a symlink to a file, use del
. For a symlink to a directory made with mklink /d
, use rmdir
.