Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Remove the symbolic-link path, not the path it points to. In Command Prompt, use del "C:pathtofile-link" for a file symbolic link and rmdir "C:pathtodirectory-link" (or rd) for a directory symbolic link. These commands delete the link entry you name; they do not target the original file or directory. Check the path carefully before pressing Enter, and do not add /s to a directory-link removal command.

Choose the command from the link type

Windows treats file links and directory links differently at the command line. The correct command is determined by what the link represents, not by the location of its target.

Link type Removal command What to check
File symbolic link del "C:pathtofile-link" The quoted path must be the link name, not the original file path.
Directory symbolic link rmdir "C:pathtodirectory-link" or rd "C:pathtodirectory-link" Use the directory link’s path. Do not use /s when you only want to remove the link.
Directory junction rmdir "C:pathtojunction" Treat the junction as a directory link for this operation; avoid recursive options.

Microsoft documents rd and rmdir as equivalent command names. Its mklink documentation shows a directory symbolic link being removed with rd and a hard link being removed with del. Microsoft Q&A also distinguishes the del workflow for a file symbolic link from the directory-link workflow.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Understand what you are deleting

A symbolic link is a separate directory entry

A symbolic link is a filesystem entry that redirects access to another file or directory. The link has its own path, while the original object has a different target path. To remove only the link, every command in this article names the link path.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

For example, suppose C:ProjectsCurrentreadme.txt is the original file and C:ProjectsShortcutreadme.txt is a file symbolic link. The safe removal command is:

del "C:ProjectsShortcutreadme.txt"

Do not substitute C:ProjectsCurrentreadme.txt. That would name the original file instead of the link.

File and directory links use different commands

del is the file-removal command used for a file symbolic link. rd and rmdir are directory-removal commands used for a directory symbolic link or junction. A directory symbolic link is created with mklink /d; a file symbolic link is created by mklink without the /d switch.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Junctions are a related directory-link case

mklink /j creates a directory junction. Microsoft support guidance groups junctions with directory links for removal, so use rmdir (or rd) and name the junction itself. Do not turn the operation into a recursive directory deletion.

Pre-removal safety check

Take a moment to establish the exact link path before running a command. This is the most important protection against deleting the wrong object.

  1. Write down the link path. Use the path displayed where the link is located, such as C:ProjectsShortcutreadme.txt or C:ProjectsShortcut.
  2. Write down the target path separately. Keep it for comparison, but do not place it in the removal command.
  3. Decide whether the link represents a file or a directory. A file link takes del; a directory link or junction takes rmdir or rd.
  4. Quote paths containing spaces. Quotation marks make the entire Windows path one command argument, for example rmdir "C:Team FilesShared Link".
  5. Review the command character by character. Confirm the drive letter, folders, link name, and extension before execution.

Step-by-step: remove a file symbolic link

1. Open Command Prompt

Run the command in a Command Prompt window. You do not need to change to the link’s directory if you provide its full path.

2. Use the link path with del

Replace the example with the path of the file link:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
del "C:pathtofile-link"

For a real-looking example:

del "C:UsersAveryDesktopreports-current.xlsx"

The name after del is the link entry on the Desktop. It must not be replaced with the original workbook’s location.

3. Check the result

After the command completes, check the directory that contained the link. The link entry should no longer be present, while the original path remains the one you preserved. If the command reports that the path cannot be found, stop and recheck spelling, drive letter, extension, and whether the entry is actually a directory link.

Step-by-step: remove a directory symbolic link

1. Confirm that the named entry is the directory link

Use the directory link’s own path, not the directory shown as its destination. For example, if C:WorkAssets- shortcut redirects to D:ArchiveAssets, the command must name C:WorkAssets- shortcut.

2. Run rmdir or rd

rmdir "C:pathtodirectory-link"

The equivalent abbreviated command is:

rd "C:pathtodirectory-link"

Microsoft’s mklink example uses rd to remove a directory symbolic link. Choose either spelling; they perform the same directory-removal operation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Leave out recursive switches

For a link-only removal, the command should end after the quoted link path. Do not append /s or /q:

rmdir "C:pathtodirectory-link"

Microsoft documents rmdir syntax as rmdir [<drive>:]<path> [/s [/q]]. The /s switch deletes the specified directory tree and its files. The /q switch suppresses confirmation when used with /s. Those options are designed for removing a directory tree, not for the narrow task of removing a directory link while preserving its target.

Step-by-step: remove a junction

A junction is created with mklink /j and represents a directory link. Use the junction’s path with rmdir:

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
rmdir "C:Legacy AppsData"

If the junction path contains spaces, retain the quotation marks. Do not use /s, because the objective is to remove the junction entry rather than request recursive deletion of a directory tree.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How mklink identifies each kind of link

Understanding the creation syntax helps you classify an existing entry when you know how it was made. Microsoft Learn describes mklink as creating a directory or file symbolic or hard link.

mklink form Link produced Removal command for this workflow
mklink <link> <target> File symbolic link by default del "<link>"
mklink /d <link> <target> Directory symbolic link rmdir "<link>" or rd "<link>"
mklink /h <link> <target> Hard link Microsoft’s example uses del "<link>"
mklink /j <link> <target> Directory junction rmdir "<link>" or rd "<link>"

The syntax places the link argument before the target argument. That ordering is useful when reviewing an old command or script: the first path is the name you would remove, and the second path is the object it redirects to.

The Microsoft Learn page lists Windows 10, Windows 11, and Windows Server 2016, 2019, 2022, and 2025 among its applicable versions. Command behavior can still depend on the exact entry and path, so classify the link before choosing the command.

Examples you can adapt

File link with spaces in its path

del "C:UsersJordanDesktopTeam Reportslatest.csv"

Here, latest.csv is the link name. The quotation marks cover the spaces in Team Reports.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Directory link with spaces

rmdir "C:UsersJordanDocumentsShared Workspace"

Use this form when Shared Workspace is the directory link entry. Do not replace it with the destination directory’s path.

Short command name

rd "D:ProjectsCurrent Build"

rd is simply the shorter equivalent of rmdir. The path still has to identify the link.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common mistakes and how to correct them

Deleting the target path by accident

Symptom: You copied the destination shown by the link and placed that path after del or rmdir.

Correction: Stop before running the command. Compare the path after the command with the location where the link entry appears. The command must name the link itself. Keep the target path out of the command.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Using del on a directory link

Symptom: The entry is a directory symbolic link or junction, but the command begins with del.

Correction: Use rmdir or rd for directory links and junctions. Reserve del for the file-link case described above.

Using rmdir /s for a link-only task

Symptom: A recursive switch was added because the link opens like a folder.

Correction: Remove /s and run only rmdir "link-path". Microsoft defines /s as deleting the specified directory tree and its files, which is broader than removing one link entry.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Adding /q without understanding what it does

Symptom: The command includes /q to make the operation “safer” or faster.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Correction: Leave it out for this task. Microsoft documents /q as suppressing confirmation when it is used with /s; it is not needed for the simple directory-link command.

Omitting quotation marks

Symptom: The link path contains spaces and Command Prompt interprets only the first part as the path.

Correction: Enclose the complete path in double quotation marks:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
rmdir "C:Company FilesOld Link"

Choosing the wrong link category

Symptom: You know the entry is linked but cannot decide between del and rmdir.

Correction: Determine whether the link represents a file or a directory. The /d form of mklink creates a directory symbolic link; no switch creates a file symbolic link; /j creates a directory junction. Apply the matching command from the table.

A practical decision tree

  1. Is the entry a file link? Run del "link-path".
  2. Is the entry a directory symbolic link? Run rmdir "link-path" or rd "link-path".
  3. Is the entry a directory junction? Run rmdir "link-path" or rd "link-path".
  4. Are you unsure which path is the link? Do not run a deletion command yet. Separate the link path from the target path using the original mklink command, documentation, or the location where the link entry is shown.
  5. Does the path contain spaces? Put the entire link path in double quotation marks.
  6. Are you tempted to add /s or /q? Leave both out for link-only removal.

What to do when the command does not work

“The system cannot find the file specified”

Check that the path is the link’s current location. Verify the drive letter, every folder name, the extension, and the link name. A stale path or a typo prevents Command Prompt from finding the entry; changing to the target path will not solve that problem because the target is not the object you intend to remove.

The command treats the path as a directory when it is a file

Reclassify the link. A file symbolic link uses del; a directory symbolic link or junction uses rmdir or rd. Re-enter the command with the link path and the matching command.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The link opens a large directory and you are worried about its contents

Do not browse from that concern into a recursive deletion command. The risk comes from naming the wrong path or adding a tree-removal switch. Confirm the link path, omit /s, and use the non-recursive directory-link command.

Reference: Microsoft command behavior

Microsoft’s mklink reference defines the link-creation syntax, identifies the /d, /h, and /j options, and demonstrates removing a directory symbolic link with rd. The rmdir reference documents rd and rmdir as equivalent and explains that /s removes a directory tree while /q suppresses confirmation when paired with /s. A Microsoft Q&A response provides the practical file-link distinction: use del for a file symbolic link and directory removal commands for directory links.

Final checklist before pressing Enter

  • The command names the link path, not the target path.
  • del is used only for a file symbolic link in this workflow.
  • rmdir or rd is used for a directory symbolic link or junction.
  • The complete path is enclosed in quotes when it contains spaces.
  • /s and /q are absent from the link-only directory command.
  • The path has been checked for the correct drive, folders, name, and extension.

Once those checks pass, execute the command that names the link entry. Removing that entry is the Windows procedure for getting rid of the symbolic link while leaving the original path outside the command.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.