Delete a Junction from Command-Line on Windows

Posted on July 21, 2018 at 2:38 pm

On Windows 7 and Windows 10 you can delete a junction from command-line.

You can use rmdir (rd) to delete junctions on Windows ,example:

cmd /c "rmdir C:\Server\"

If rmdir gives you Access Denied error, try to use fsutil:

fsutil reparsepoint delete "C:\Server\"

More info here: Fsutil reparsepoint | Microsoft Docs

Additionally, you can use Junction (by Windows Sysinternals) like this:

junction -d  "C:\Server\"

Receive updates via email

Other Posts

Updated Posts