Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I believe in Windows Vista, we could use linkd command. However, I cannot find this command in Windows 7. I know I can use Windows Explorer and delete the junction, but I wonder if this can be done in command prompt.

While I can use mklink command to create a junction from a command prompt, so, what is the opposite of it (something like linkd)?

share|improve this question
up vote 76 down vote accepted

Delete junctions with rmdir (rd). Works in all Windows versions.

share|improve this answer
@gravity, thanks! rd works while del does not. – Nord May 19 '11 at 5:45
As a Linux user I really struggled to find this. Thanks so much! – Jonathon Reinhart Oct 28 '11 at 1:05
@JonathonReinhart I resonate well with that. If only Windows started used swap and ext4 without third-party software! – mjohnsonengr Aug 15 '12 at 16:02
@Vi3GameHkr: If only Linux started using ntfs without third-party software... /// Windows does use swap, it just calls it "paging file". – grawity Sep 7 '12 at 13:05
This does not work in Powershell - it will follow the junction and delete all files. Use cmd /c "rmdir mydir". – Brian Low Sep 15 '14 at 6:00

Use the -d flag on junction (junction -d ...)


share|improve this answer

fsutil reparsepoint delete <<PATH>>

In my experience this will take care of some cases where rmdir gives Access Denied.

share|improve this answer
linkd source /D

will delete the junction point (the link) without deleting on destination

share|improve this answer
Read the question. This command doesn't exist in Windows 7. – Aaronaught Nov 24 '13 at 17:27

To delete junction directory using junction command as below :

 junction -d "<Destination>"

For example:

junction -d  "D:\webapps\app"
share|improve this answer
This requires the installation of Windows Sysinternals Junction. – Axel Kemper Nov 20 '15 at 18:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.