How To Delete Mapped Drives in Windows

Introduction

Mapped network drives allow you to access folders and shares on other computers and servers on your network. You assign a drive letter to the network location, making it appear as another drive on your computer for easy access.

Over time, you may accumulate several mapped drives that you no longer need. Too many unused mapped drives can clutter up File Explorer. Fortunately, Windows makes it easy to delete unnecessary mapped drives.

In this guide, we will cover several methods to delete mapped drives on Windows 11, Windows 10, and Windows 7.

Prerequisites

  • You must have administrator privileges on the computer to delete mapped drives.
  • Know which mapped drive letters you want to remove.

Methods to Delete Mapped Drives

There are several ways to delete mapped drives on Windows. The main methods are:

  • File Explorer
  • Command Prompt
  • Local Group Policy Editor (Windows 10/11 Pro/Enterprise/Education only)

We will cover each method in detail below.

Delete Mapped Drive in File Explorer

Deleting a mapped drive in File Explorer is quick and easy:

  1. Open File Explorer and click This PC in the left pane.
  2. Under Network Locations, right-click the mapped drive and select Disconnect.

The mapped drive will immediately disappear from File Explorer.

Delete Mapped Drive Using Command Prompt

The Command Prompt gives you more control over deleting mapped drives:

  1. Search for Command Prompt, right-click it, and select Run as administrator.
  2. Type the command: net use [drive letter]: /delete
  3. Press Enter. Replace [drive letter] with the mapped drive letter you want to remove.

For example, to remove drive X:, type:

net use x: /delete 

This will instantly remove the mapped drive.

Delete All Mapped Drives

To delete ALL mapped drives at once with Command Prompt:

  1. Follow steps 1-2 above to open an admin Command Prompt.
  2. Type the command: net use * /delete /y
  3. Press Enter. All mapped drives will immediately be removed.

Prevent Mapped Drives Using Local Group Policy

If you have Windows 10/11 Pro, Enterprise, or Education, you can use the Local Group Policy Editor to prevent users from mapping drives. This removes the Map Network Drive option from File Explorer.

  1. Type gpedit.msc and press Enter to open Local Group Policy Editor.
  2. Go to User Configuration -> Administrative Templates -> Windows Components -> File Explorer.
  3. Double click on Remove “Map Network Drive” and “Disconnect Network Drive”.
  4. Click Enabled and then OK.
  5. Close Local Group Policy Editor.

The Map Network Drive option will now be disabled in File Explorer’s context menu.

Alternative Methods

Here are some alternative ways to delete mapped drives on Windows:

  • Delete mapped drive shortcuts in the %appdata%\Microsoft\Windows\Network Shortcuts folder (for drive letter mappings).
  • Delete registry keys related to the mapped drive in HKEY_CURRENT_USER\Network and HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2 (for persistent mapped drives).
  • Use the Remove-PSDrive cmdlet in PowerShell.
  • Use the Wmiprvse.exe command line tool.

These methods provide more advanced control over removing mapped drives from the system.

Troubleshooting Mapped Drives

Sometimes mapped drives won’t disconnect properly. The drive may still show up in File Explorer even after using the delete methods above.

To troubleshoot ghost mapped drives:

  • Restart the File Explorer process.
  • Log off and log back on.
  • Reboot your computer.
  • Manually delete relevant registry keys related to the mapped drive.

This should clear any stuck mapped drives from File Explorer.

Conclusion

Deleting unnecessary mapped drives helps declutter your File Explorer and system. We covered several easy methods to remove mapped drives, including using File Explorer, Command Prompt, and Local Group Policy Editor.

Now you know how to effectively delete mapped drives when you no longer need quick access to those remote network locations. Removing unused mapped drives can speed up your File Explorer performance over time.